summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the new syslog() overrides.Gergely Nagy2012-03-202-21/+129
| | | | | | | | | | | | | | | | | | | | Changed the API, so that we have cee_(v)syslog(), which is the enhanced syslog API, that takes key-value pairs in addition to the traditional message, and outputs CEE-JSON to syslog. We also have (v)syslog() overrides, that do the same, just without the extra key-value pairs. Both of these add some extra stuff, via _cee_discover(): at the moment, this is the facility, the priority and the pid. We also override openlog(), that stores some info in thread-local storage. That info is used by _cee_discover(). For future use, this patch also defines LOG_CEE_NODISCOVER and LOG_CEE_NOCACHE. They're not used anywhere yet, though. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
* Lift out the JSON appender from _cee_vsyslog()Gergely Nagy2012-03-191-11/+31
| | | | | | | | I want to be able to modify the JSON from different functions, so that they can build on each other. For this to work, I need to be able to append to it, so I lifted it out into a separate function instead. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
* Remove the syslog() and vsyslog() overrides.Gergely Nagy2012-03-191-6/+0
| | | | | | | We will override syslog() and vsyslog() with other functions, remove the current aliases for now. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
* Lift out the formatting into a separate function.Gergely Nagy2012-03-192-13/+50
| | | | | | | | | | | | | | The formatting itself is now lifted out to _cee_vformat(), which returns a const char *, and puts the JSON object into its first (output) parameter. We then export cee_format() and cee_vformat(), that use this, strdup and return the result, and free the JSON object too. cee_vsyslog() was changed to use _cee_vformat(), because it does not need to strdup() the result. Signed-off-by: Gergely Nagy <algernon@balabit.hu>
* Initial import.Gergely Nagy2012-03-194-0/+155