eggdrop
eggdrop copied to clipboard
Enhance logging - add millisecs (add %f specifier for timestamp-format)
Found by: michaelortmann Patch by: michaelortmann Fixes:
One-line summary:
Add %f specifier for timestamp-format
Additional description (if needed):
I always wanted to have the possibility to let eggdrop log showing milliseconds. Often i found myself adding this while debugging. Last time i missed it was with ident race debugging. This PR adds %f as an additional format specifier for timestamp-format.
Test cases demonstrating functionality (if applicable):
conf:
set timestamp-format {[%H:%M:%S.%f]}
$ ./eggdrop -t BotA.conf
[...]
*** -HQ joined the party line.
[22:19:02.736] main: entering loop
[...]
[22:19:39.804] #test6888: mode change '+t ' by [email protected]
Test %f vs. %%f:
conf:
set timestamp-format {[%H:%M:%S.%f]}:
result:
[12:57:54.481]
conf:
set timestamp-format {[%%H:%%M:%%S.%%f]}
result:
[%H:%M:%S.%f]