haproxy syslog comptible

Slawa Olhovchenkov slw at zxy.spb.ru
Mon Jun 24 14:42:43 UTC 2019


On Mon, Jun 24, 2019 at 10:35:03AM -0400, Paul Mather wrote:

> On Jun 24, 2019, at 10:17 AM, Slawa Olhovchenkov <slw at zxy.spb.ru> 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?
> > _______________________________________________
> > freebsd-stable at freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
> 
> 
> 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.)

I mean you talk about different syslogd, not from FreeBSD:

syslogd: illegal option -- O
usage: syslogd [-468ACcdFknosTuv] [-a allowed_peer]
               [-b bind_address] [-f config_file]
               [-l [mode:]path] [-m mark_interval]
               [-P pid_file] [-p log_socket]


More information about the freebsd-stable mailing list