summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* TODO.org: New file.Gergely Nagy2012-03-201-0/+44
| | | | Signed-off-by: Gergely Nagy <algernon@balabit.hu>
* README.rst: New file.Gergely Nagy2012-03-202-1/+70
| | | | Signed-off-by: Gergely Nagy <algernon@balabit.hu>
* LICENSE: Typo fix.Gergely Nagy2012-03-201-1/+1
| | | | Signed-off-by: Gergely Nagy <algernon@balabit.hu>
* Add the identity to the automatically added fields.Gergely Nagy2012-03-201-0/+3
| | | | | | | | | The identity, as set by the first argument to openlog() can be cached away, and later used as the program name (that's pretty much how syslogds treat it, too), so add it to the list of automatically discovered fields. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
* Implement a wrapper for setlogmask()Gergely Nagy2012-03-202-2/+23
| | | | | | | | Since we'd like to avoid doing useless work during logging, wrap setlogmask() too, and save the mask set, so during _cee_vsyslog(), we can bail out early, if our priority is not set in the mask. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
* Implement LOG_CEE_NOCACHE & LOG_CEE_NODISCOVER handlingGergely Nagy2012-03-201-1/+13
| | | | | | | | | When LOG_CEE_NODISCOVER is set during openlog(), then don't do any discovery, not even when the value is cached. When _NOCACHE is set, then do not use the cached values for properties that can change during runtime, and their new value can be detected at runtime too. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
* 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>
* Ignore *~ files tooGergely Nagy2012-03-191-0/+1
|
* Initial import.Gergely Nagy2012-03-199-0/+265