| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call glibc's parse_printf_format() to gather information about
argument types. This automatically handles positional parameters and
user-defined printf formats for ordinary parameter types; it doesn't
handle user-defined printf parameter types (such as defined by libdfp
for decimal floating-point).
Also add a (non-comprehensive) test.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
Recognize more length modifiers. Document that positional parameters
are not supported (it should be possible, I'm just lazy :)).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our openlog() wrapper fills in a couple of variables, and those were
kept around even after a closelog(), and thus, affected ul_format()
calls even after a closelog().
This in turn, made one of the test cases fail, as that was relying on
the default behaviour, which was modified due to an openlog() in an
earlier test case.
We now wrap closelog() aswell, and NULL out our settings to get a
clean state, and add a test case to verify this behaviour aswell.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of calling abort() if vasprintf() fails, and ignoring possible
errors from the JSON library, do handle errors reasonably sanely:
check return values, and return an error state from all functions, and
propagate it up to the application level, too.
This means that the legacy overrides will silently fail, but set errno
appropriately in case serializing to JSON fails, and do what the
system libc does with syslog otherwise.
The new functions can return NULL or non-zero on error, which the
application can then handle as it sees fit.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
The advantage of ReStructuredText is that this allows converting the
same source into different formats, such as HTML.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|