busybox/sysklogd
Peter Korsgaard eb7f9acda1 syslogd: add config option to include milliseconds in timestamps
For some use cases, having logs with more than 1 second accuracy can be
helpful.  Add an option to include milliseconds when adding a timestamp in
HH:MM:SS.mmm format, similar to syslog-ng with fraq_digits(3) or journalctl
-o short-precise.

For simplicity, abuse the remaining space in the buffer used by ctime to add
the millieconds (overwriting year).

function                                             old     new   delta
timestamp_and_log                                    401     448     +47

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2020-01-29 13:56:36 +01:00
..
Config.src restore documentation on the build config language 2018-06-06 15:16:48 +02:00
Kbuild.src sysklogd/*: convert to new-style "one file" applets 2015-10-18 22:40:09 +02:00
klogd.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
logger.c config: update size information 2018-12-28 03:20:17 +01:00
logread.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
syslogd_and_logger.c use gmtime_r() instead of gmtime() 2018-03-06 18:11:47 +01:00
syslogd.c syslogd: add config option to include milliseconds in timestamps 2020-01-29 13:56:36 +01:00