inside debug logging, the date property options were not all
properly converted into strings. Some of the newer ones were
invalidly flagged as "UNKNOWN". This is primarily a cosmetic
problem and has no effect other than puzzling folks looking at
the debug log.
This enables easy JSON generation via template.
This commit also corrects an issue with the constant "jsonf"
format. That was recently added, and the implementation problem
only became visible when used inside a larger json object. No
officially released code is affected, thought - so it rellay
is just a side-note.
closes https://github.com/rsyslog/rsyslog/issues/2347
could happen if the config was loaded and the parameters could not
properly be processed. If so, this occured only during the startup
phase.
Detected by Coverity scan, CID 185318
This is only triggered if we do not get memory to do proper escaping,
so this code is unlikely to be executed. However, we think that
forwards slash is a better susbstitute for backslash than is the
single quote char.
commit 27af112637b47fd80c9ffb80565e61e049b88774 tried to fix
json encoding, but introduced an invalid predicate check that
lead to no encoding at all.
see also https://github.com/rsyslog/rsyslog/pull/1216
Happens when template name shorter than two chars and outname
is not set. Once we are over startup, things work reliably.
This was a bug that's present for quite a while.
the function can no longer fail and it is not expected that this
will ever happen again in the future. So we remove the return value,
giving a small speedup to the code.
We could not reference mixed or upper case variables properly prior to
this change, as they were always lowercased before references were
pulled.
The new "option.casesensitive" for templates allows folks to turn on
variable name reference case sensitivity on a template by template
basis.
Remove the use sizeof(char) or sizeof(uchar) in calculations for memory
allocation or string length. There are no known platforms for which
sizeof(char) or sizeof(uchar) is not 1, and c99 has defined sizeof(char)
to be 1 (section 6.5.3.4 of c99).