Rainer Gerhards
accfa81e5d
cleanup: remove compatibility checks for old json-c
...
as we now use libfastjson, we do no longer need to check for "new"
features, as these are always present in libfastjson (things
like json_object_object_get_ex()).
closes https://github.com/rsyslog/rsyslog/issues/935
2016-04-05 12:16:09 +02:00
Rainer Gerhards
2e55c77d70
clean up doAction output module interface
...
We started with char * pointers, but used different types of pointers
over time. This lead to alignment warnings. In practice, I think this
should never cause any problems (at least there have been no reports
in the 7 or so years we do this), but it is not clean. The interface is
now cleaned up. We do this in a way that does not require modifications
to modules that just use string parameters. For those with message
parameters, have a look at e.g. mmutf8fix to see how easy the
required change is.
2016-01-13 04:04:26 -05:30
Rainer Gerhards
6937df34c2
mmjsonparse: fix small one-time memory leak
...
happens exactly once during startup, no real problem except
for testbench, where valgrind reports an error
2015-11-17 10:47:39 +01:00
Rainer Gerhards
b276665ea9
fix C++ comment
...
C++ comments do not work in C on all platforms
2015-07-28 12:09:23 +02:00
Rainer Gerhards
86d2aa713e
Merge branch 'patch-1' of https://github.com/antmat/rsyslog into tmp-merge
2015-07-28 12:05:57 +02:00
Anton Matveenko
6e62f42349
fix memleak in mmjsonparse plugin
...
During json processing it was not add into message if it was not parsed fully even when json is not null. It resulted in memory leak and this patch fixes this behaviour.
2015-05-28 20:03:36 +03:00
Janmejay Singh
15afe8245f
created param in add-flow to indicate if a graph being added to global-variable is shared, so it can be deep-copied instead of referenced (external modifications to which can not be protected from unsafe concurrent access) + killed an unused function
2015-05-26 09:41:35 +05:30
Dustin Koupal
2d0640cced
adding ability to use rawmsg for mmjsonparse
2015-01-30 01:03:06 +00:00
Janmejay Singh
4ca5e217e2
Adds support for 'reset' statement (it has syntax similar to set 'set', but _unlike_ 'set' always force-sets the given value insteed of conditionally merging it, or not saving it because it is trying to replace an object with a leaf value etc).
...
Syntax:
reset $.foo = $!bar;
etc.
2014-12-17 11:39:31 +01:00
Rainer Gerhards
a9c6a6ec4a
bugfix: mmjsonparse did not build with json-c < 0.10
...
This was a regression introduced some time in the past in order to
support API changes in json-c. Now we check for the version and use
proper code.
2014-07-15 15:28:27 +02:00
Rainer Gerhards
a452fe7093
mmjsonparse: support for different cookies and target containers complete
...
This fixes the case where the target container was selected wrongly.
2014-07-15 15:19:32 +02:00
Rainer Gerhards
00abf92b4c
milestone/mmnormalize: support configurable cookies and target containers
...
code looks ok and compiles, but has NOT yet undergone real testing
2014-07-15 14:29:53 +02:00
Rainer Gerhards
e06aa53150
Merge branch 'v7-stable' into v8-stable
2014-04-16 10:20:13 +02:00
Thomas D
d6f5d5aae5
Fix for https://github.com/rsyslog/rsyslog/issues/61
...
Based on Maxim Koltsov proposed patch from https://bugs.gentoo.org/show_bug.cgi?id=507730
2014-04-16 10:17:50 +02:00
Rainer Gerhards
f69a92a42f
mmjsonparse: support v8 omod interface
2013-11-11 16:11:01 +01:00
hwoarang
1c71b9628b
make rsyslog use the new json-c pkgconfig file if available
2013-09-03 11:38:01 +02:00
Tomas Heinrich
b424b8c249
Don't #include libestr and libee headers when not necessary
...
Through msg.h, many unrelated components needlessly required
LIBEE_CFLAGS.
2013-05-20 21:32:49 +02:00
Rainer Gerhards
e082cb0742
bugfix: mmjsonparse segfault if new-style config was used
2013-01-30 15:48:18 +01:00
Rainer Gerhards
84f959d4f0
Merge branch 'v7-stable'
2013-01-08 13:07:47 +01:00
Rainer Gerhards
bbb2066d17
bugfix: mmjsonparse errornously returned action error when no CEE cookie was present.
2013-01-08 12:49:02 +01:00
Rainer Gerhards
e581c3d26e
Merge branch 'v7-stable'
...
Conflicts:
doc/imptcp.html
plugins/mmjsonparse/mmjsonparse.c
plugins/mmnormalize/mmnormalize.c
2012-11-28 10:19:29 +01:00
Rainer Gerhards
d9df6e9775
bugfix: modules not (yet) supporting new conf format were not properly registered
...
This lead to a "module not found" error message instead of
the to-be-expected "module does not support new style" error message.
That invalid error message could be quite misleading and actually stop
people from addressing the real problem (aka "go nuts" ;))
2012-11-28 10:02:08 +01:00
Rainer Gerhards
db6db9ce0d
mmjsonparse: support for v6+ config interface added
2012-11-01 17:22:23 +01:00
Miloslav Trmač
829b0639a0
Don't require the trailing space in @cee: cookie
...
The only mention of @cee: in the Lumberjack pages,
https://fedorahosted.org/lumberjack/wiki/FieldList doesn't have a space,
and libumberlog does not in fact generate one.
2012-10-11 18:19:06 +02:00
Rainer Gerhards
7a5cfb14ad
get rid of compiler warning
2012-10-02 15:53:17 +02:00
Rainer Gerhards
66e07f7b3e
cleanup
2012-10-02 15:41:58 +02:00
Rainer Gerhards
2ef5dd4739
mmjsonparse: also add MSG part of message if CEE-parsing fails
...
In that case, the CEE/lumberjack spec says MSG is NON-CEE and must
be treated accordingly. This means no JSON parsing happens. The case
is equal to missing CEE cookie.
Also adapted module to new interfaces provided by msg object.
2012-10-02 15:36:20 +02:00
Milan Bartos
0faec96283
Change mmjsonparse so non-json messages doesn't get lost from ceelog
...
modified: mmjsonparse.c
2012-10-02 15:26:09 +02:00
Rainer Gerhards
145c78b4fe
minor cleanup
2012-08-27 16:02:23 +02:00
Rainer Gerhards
6bb9c7c18e
milestone: first PoC for hierarchical data inside msg
2012-08-27 15:29:39 +02:00
Rainer Gerhards
66ab2a70e5
added message property parsesuccess to indicate status of higher level parser run
...
added message property parsesuccess to indicate if the last run
higher-level parser could successfully parse the message or not
(see property replacer html doc for details)
2012-03-15 17:25:26 +01:00
Rainer Gerhards
9053b30c6d
mmjsonparse: changed cookie back to @cee: after discussion with Balabit
2012-02-22 09:44:18 +01:00
Rainer Gerhards
6689756624
added mmjsonparse to support recognizing and parsing JSON enhanced syslog messages
2012-02-21 12:12:51 +01:00