Denys: Any thoughts on this patch?
Best, Grant -- Principal Nuovations gerick...@nuovations.com https://www.nuovations.com/ On Apr 4, 2025, at 9:58 AM, Grant Erickson <gerick...@nuovations.com> wrote: > > > This provides unification for the several syslogd options that > influence handling and formatting of log timestamps and adds a new > configuration and option. > > First, this unifies the handling of messages with a client-generated > timestamps when both 'FEATURE_SYSLOGD_PRECISE_TIMESTAMPS' and > 'FEATURE_SYSLOGD_UTC' are asserted. > > In particular, to support the intermix of client-generated and > server-generated timestamps, the former are zero-padded such that the > timestamp "column" of a log file is consistent in format. > > Second, this adds a configurable option 'FEATURE_SYSLOGD_ISO8601FMT' enabling > a command line option ('-I', with semantics similar to 'date') that > directs syslogd to log timestamps in ISO 8601 format. > > Precision in seconds (the default), milliseconds, and microseconds are > supported. Without the 'FEATURE_SYSLOGD_UTC' configuration and its > '-u' option, outputs are of the form: > > YYYY-MM-DDThh:mm:ss±hhmm (seconds) > YYYY-MM-DDThh:mm:ss.sss±hhmm (milliseconds) > YYYY-MM-DDThh:mm:ss.uuuuuu±hhmm (microseconds) > > with the 'FEATURE_SYSLOGD_UTC' configuration and its '-u' option, > outputs are of the form: > > YYYY-MM-DDThh:mm:ssZ (seconds) > YYYY-MM-DDThh:mm:ss.sssZ (milliseconds) > YYYY-MM-DDThh:mm:ss.uuuuuuZ (microseconds) > > With all three of the follow options asserted: > > * FEATURE_SYSLOGD_PRECISE_TIMESTAMPS > * FEATURE_SYSLOGD_UTC > * FEATURE_SYSLOGD_ISO8601FMT > > there are a total of twenty (20) possible test cases of which sixteen > (16) are unique (several of which are defaults): > > 1. syslogd -O - -n > 2. syslogd -O - -n -u > 3. syslogd -O - -n -I > 4. syslogd -O - -n -Is > 5. syslogd -O - -n -Ims > 6. syslogd -O - -n -Ius > 7. syslogd -O - -n -I -u > 8. syslogd -O - -n -Is -u > 9. syslogd -O - -n -Ims -u > 10. syslogd -O - -n -Ius -u > 11. syslogd -O - -n -t > 12. syslogd -O - -n -t -u > 13. syslogd -O - -n -t -I > 14. syslogd -O - -n -t -Is > 15. syslogd -O - -n -t -Ims > 16. syslogd -O - -n -t -Ius > 17. syslogd -O - -n -t -I -u > 18. syslogd -O - -n -t -Is -u > 19. syslogd -O - -n -t -Ims -u > 20. syslogd -O - -n -t -Ius -u > > which result in the following test output, generated interactively > with 'logger' over ssh: > > [ … ] > > -- > 2.45.0 _______________________________________________ busybox mailing list busybox@busybox.net https://lists.busybox.net/mailman/listinfo/busybox