On Jun 24, 2019, at 10:17 AM, Slawa Olhovchenkov <[email protected]> wrote:

I am use haproxy logged to syslog and have log lines like this:

Jun 24 17:04:25 ha01 haproxy[32508]: 193.34.87.146:57625 [24/Jun/2019:17:04:23.277] balancer~ default-pool/main 0/0/0/-1/2012 504 194 - - sH-- 888/888/4/4/0 0/0 "POST /vs HTTP/1.1"

Is this posible to learn syslogd to use mileseconds timestamps?
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[email protected]"


Run syslogd with "-O syslog" to get timestamps logged with microsecond precision (as well as time zones). You can add that to your "syslogd_flags" setting in /etc/rc.conf. (See man syslogd for details.)

Note that the format of syslog entries changes with "-O syslog". You get logs like this:

<38>1 2019-04-12T10:43:56.525458-04:00 xxxxx.xxxxx.net sshd 1253 - - Received signal 15; terminating. <38>1 2019-04-12T10:48:05.058693-04:00 xxxxx.xxxxx.net sshd 1238 - - Server listening on :: port 22.


(Note that the precision also depends upon the client application logging to syslog.)

Cheers,

Paul.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[email protected]"

Reply via email to