114 Commits

Author SHA1 Message Date
Rainer Gerhards
8939ccfffd Merge branch 'v5-stable' into v6-stable
Conflicts:
	ChangeLog
	action.c
	configure.ac
	doc/manual.html
	runtime/ruleset.c
	template.h
	threads.c
	tools/syslogd.c
2012-08-25 11:55:41 +02:00
Rainer Gerhards
0c65e62965 Merge branch 'v5-stable' of git+ssh://git.adiscon.com/git/rsyslog into v5-stable
Conflicts:
	template.c
2012-08-25 11:30:18 +02:00
Rainer Gerhards
1824ab8d98 change template.[ch] to ASL 2.0, removing a GPLv3-only patch
see template.c file header for details
Note that this functionality was almost never used in practice
2012-08-25 11:21:26 +02:00
Rainer Gerhards
1eac94e11d v6 config/templates: legacy types are now supported via template() 2012-08-25 11:08:38 +02:00
Rainer Gerhards
9801893b29 Merge branch 'v5-stable-field-substring' into v5-beta 2012-04-27 09:55:11 +02:00
Rainer Gerhards
9c76723c5b added capability to specify substrings for field extraction mode 2012-04-27 09:42:53 +02:00
Rainer Gerhards
5624012710 added capability to specify substrings for field extraction mode 2012-04-26 15:50:49 +02:00
Rainer Gerhards
7f0cd8c8b9 added the "jsonf" property replacer option (and fieldname) & bugfix
bugfix: property replacer option "json" could lead to content loss
        message was truncated if escaping was necessary
2012-04-19 15:20:16 +02:00
Rainer Gerhards
b88ba949f8 added "date-unixtimestamp" property replacer option to format as a unix timestamp 2012-03-29 18:04:12 +02:00
Rainer Gerhards
62b7a1b8a8 added "json" property replacer option 2012-03-16 08:21:12 +01:00
Rainer Gerhards
6db75eb0d2 cleanup: different text escape types made more portable 2012-01-19 15:07:25 +01:00
Rainer Gerhards
03be2fcd7c Merge branch 'v5-devel' into master
Conflicts:
	ChangeLog
	Makefile.am
	configure.ac
	doc/manual.html
	plugins/imptcp/imptcp.c
	plugins/imudp/imudp.c
	plugins/imuxsock/imuxsock.c
	runtime/parser.c
	template.c
	tools/omfwd.c
	tools/syslogd.c
2012-01-18 14:51:33 +01:00
Nathan Scott
052b1c7594 add JSON escaping option
Following the path taken by the two SQL formatting options,
which escape single quotes with double quotes (amongst other
things), this patch adds a JSON quoting option.  JSON is the
opposite to the SQL options, requiring double quotes to be
quoted within a string.  This patch provides a formatting
option implementing this requirement, while piggy-backing on
the existing code as much as possible.

Signed-off-by: Nathan Scott <nathans@aconex.com>
2012-01-17 10:29:02 +01:00
Rainer Gerhards
f72bde2f70 milestone: templates are now in config object 2011-04-19 09:43:36 +02:00
Rainer Gerhards
471f07f45a milestone: template supports CEE output via %$!all-json% 2010-12-01 10:19:50 +01:00
Rainer Gerhards
d9e64c16e5 finshed implementation of strgen modules
and also provided four build-in modules for the most common use
cases, hopefully resulting in a speedup of around 5% for typical
rsyslog processing.
2010-06-04 12:45:31 +02:00
Rainer Gerhards
527bfcea5c first implementation of strgen interface
and a first built-in strgen module. Some tweaks and more default strgens
are needed, but the code doesn't look too bad ;)
2010-06-01 18:51:55 +02:00
Rainer Gerhards
59227a8618 experimental commit: facility to generate template via C function
This was a test done to try to generate templates with C code, via
a new (potentially to-be-implemented) class of template modules. We have
a rough POC inside this code, and it showed around 5% or better speedup. So
it semms worth continuing in this direction.

Note that this experimental commit works correct, but does any
template in the form of

$template tpl,=somewhat

will lead to fixed template expansion based on the default file format.
2010-06-01 13:53:12 +02:00
Rainer Gerhards
b3c8528b50 added new property replacer option "date-rfc3164-buggyday"
primarily to ease migration from syslog-ng. See property replacer doc
for details.
2010-03-05 07:56:57 +01:00
Rainer Gerhards
7ea63db2f9 optimization: propert names are now internally identified by integers 2009-06-26 15:31:40 +02:00
Rainer Gerhards
3abf567d2b optimized template string generation 2009-06-19 16:07:17 +02:00
Rainer Gerhards
ec0e2c3e7d added a new way how output plugins may be passed parameters.
This is more efficient for some outputs. They new can receive fields not only
as a single string but rather in an array where each string is seperated.
2009-04-03 12:51:02 +02:00
Rainer Gerhards
3954f2e166 added new "csv" property replacer option
to enable simple creation of CSV-formatted outputs (format
from RFC4180 is used)
2009-04-02 12:48:07 +02:00
Rainer Gerhards
c9078c7220 Merge branch 'v3-stable' into beta
Conflicts:

	ChangeLog
	doc/manual.html
2008-11-11 12:58:53 +01:00
Rainer Gerhards
4cfbf894fd enhance: regex nomatch option "ZERO" has been added
This allows to return the string 0 if a regular expression is
not found. This is probably useful for storing numerical values into
database columns.
2008-11-11 12:00:11 +01:00
Zhuang Yuyao
d65470842d added new capability to property replacer.
Multiple immediately successive field delimiters are treated as
a single one.

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2008-09-10 12:18:34 +02:00
Rainer Gerhards
d45a286f2d Merge branch 'v3-stable' into beta
Conflicts:

	doc/property_replacer.html
	tools/syslogd.c
2008-07-18 14:51:49 +02:00
Rainer Gerhards
73abfd1fad added new poperty replacer option, added missing documentation
- added a new property replacer option "sp-if-no-1st-sp" to cover
  a problem with RFC 3164 based interpreation of tag separation. While
  it is a generic approach, it fixes a format problem introduced in
  3.18.0, where kernel messages no longer had a space after the tag.
  This is done by a modifcation of the default templates.
  Please note that this may affect some messages where there intentionally
  is no space between the tag and the first character of the message
  content. If so, this needs to be worked around via a specific
  template. However, we consider this scenario to be quite remote and,
  even if it exists, it is not expected that it will actually cause
  problems with log parsers (instead, we assume the new default template
  behaviour may fix previous problems with log parsers due to the
  missing space).
- doc bugfix: property replacer options secpath-replace and
  secpath-drop were not documented
2008-07-18 12:50:14 +02:00
Rainer Gerhards
2687d0010c added new property replacer option "time-subseconds"
enables to query just the subsecond part of a high-precision timestamp
2008-06-06 17:33:58 +02:00
Rainer Gerhards
eddaca33a8 enhanced property replacer to support multiple regex matches 2008-06-04 11:11:52 +02:00
Rainer Gerhards
6a815063f3 capability for replacement text in no match regex case added
implemented in property replacer: if a regular expression does not match,
it can now either return "**NO MATCH** (default, as before), a blank
property or the full original property text
2008-05-30 15:18:03 +02:00
Rainer Gerhards
99f18190a1 enhanced property replacer's regex to support submatches
- enabled Posix ERE expressions inside the property replacer
  (previously BRE was permitted only)
- provided ability to specify that a regular expression submatch shall
  be used inside the property replacer
2008-05-29 12:48:15 +02:00
Rainer Gerhards
61ba5ff595 Merge branch 'beta'
Conflicts:

	ChangeLog
	configure.ac
	doc/ommail.html
	queue.c
2008-04-15 11:07:59 +02:00
Rainer Gerhards
890f782323 some cleanup 2008-04-11 17:33:13 +02:00
Rainer Gerhards
2b51fcab7b applied patch from Tiziano Müller to remove some compiler warnings 2008-04-11 15:08:09 +02:00
Rainer Gerhards
549c0cccd4 extracted regexp functionality to its own dynamically loadable module 2008-03-07 16:10:58 +00:00
Rainer Gerhards
fa67273c16 - added RSYSLOGD_MODDIR environment variable
- added -M rsyslogd option (allows to specify module directory location)
- converted net.c into a loadable library plugin
2008-03-07 08:06:16 +00:00
Rainer Gerhards
1e047df3b9 added some code to expr.c - not yet to be used 2008-02-13 07:08:18 +00:00
Rainer Gerhards
004229dda6 changed license to GPLv3 (for what is to become rsyslog v3) 2007-12-14 11:21:57 +00:00
Rainer Gerhards
83b91cb894 adding sur5r's postgres module - many thanks for providing it! There are a
number of patches necessary to core modules, because we need a new
    formatting function (date-pgsql).
2007-12-03 11:06:46 +00:00
Rainer Gerhards
82aeadce54 - changed part of the CStr interface so that better error tracking is
provided and the calling sequence is more intuitive (there were invalid
    calls based on a too-weired interface)
- (hopefully) fixed some remaining bugs rooted in wrong use of the CStr
    class. These could lead to program abort.
2007-09-05 15:59:47 +00:00
Michael Meckelein
262111689f patches and docu update for 1.19.3 2007-08-31 12:47:35 +00:00
Rainer Gerhards
acb7dae3ae moved action object out of syslogd.c to its own fileset (action.c/h) 2007-08-06 20:51:52 +00:00
Rainer Gerhards
5197130228 - I found out that we finally have problems with the (somewhat recursive)
call to logerror() that many of the modules do. I have not tried it,
    but I think things will become wild when we compile without pthread
    support. Threading prevents full recursion, so we have not seen any bad
    effects so far. However, the problems that I experienced in ommysl
    (that caused me to re-structure startWorker()) are actually rooted in
    this issue. I first thought to fix it via a module interace, but I now
    came to the conclusion that it is not more effort and much cleaner to
    do an internal error buffering class. This is implemented in
    errbuf.c/h.
- I just noticed that this is not actually an error buf, but the core of an
    input module for all internal messages. As such, I implement it now as
    iminternal.c/h. Of course, there is no input module interface yet
    designed, but that doesn't matter. Worst-case, I need to re-write the
    im, best case I can use the im (at least partly) to define the
    interface.
- added a few functions to the linkedlist class
- error messages during startup are now buffered - so we do no longer need
    to think about how emergency logging might work. Actually, these are
    logged to whatever is instatiated in the log file. This enhances the
    chance that we will be able to drop the error message somewhere it is
    seen.
2007-08-03 14:58:24 +00:00
Rainer Gerhards
6b24fa20d4 moved file write output module to own set of code files 2007-07-22 16:03:45 +00:00
Rainer Gerhards
4d53a1e6a3 moved part of the shell action to its own module 2007-07-20 15:40:01 +00:00
Rainer Gerhards
4a963e5f1f code cleanup (removed compiler warnings 2007-07-18 15:16:15 +00:00
Rainer Gerhards
48c0c81132 fixed minimal memory leak on HUP (caused by templates) thanks to
varmojfekoj for the patch
2007-07-18 10:49:27 +00:00
Rainer Gerhards
456c701f8c some more unsigned char conversions... 2007-07-04 09:41:42 +00:00
Rainer Gerhards
53c1a7305e added support for dynamic file names in selector lines. Can now be created
with templates.
2007-07-03 12:39:13 +00:00