summaryrefslogtreecommitdiffstats
path: root/lib/umberlog.rst
Commit message (Collapse)AuthorAgeFilesLines
* Leave printf format parsing to glibc if possible.Gergely Nagy2012-07-191-3/+5
| | | | | | | | | | | | | 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>
* Handle more types in printf()-like specifiersMiloslav Trmač2012-07-191-1/+2
| | | | | | | 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>
* Add a closelog() wrapper to clear the environmentGergely Nagy2012-04-281-1/+7
| | | | | | | | | | | | | | | 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>
* Put the man page in section 3, instead of 1Gergely Nagy2012-03-241-1/+1
| | | | Signed-off-by: Gergely Nagy <algernon@balabit.hu>
* Implement proper error handling.Gergely Nagy2012-03-241-7/+16
| | | | | | | | | | | | | | | | 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>
* Fix a formatting mistake in the API docs.Gergely Nagy2012-03-231-2/+2
| | | | Signed-off-by: Gergely Nagy <algernon@balabit.hu>
* Convert the manual page from roff to rst.Gergely Nagy2012-03-231-0/+139
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>