Date: Mon, 24 Jun 2019 10:44:26 -0400 From: Paul Mather <paul@gromit.dlib.vt.edu> To: Slawa Olhovchenkov <slw@zxy.spb.ru> Cc: freebsd-stable@freebsd.org Subject: Re: haproxy syslog comptible Message-ID: <FAAD8578-A0FC-4320-B4FF-356E2A347252@gromit.dlib.vt.edu> In-Reply-To: <20190624144239.GK2161@zxy.spb.ru> References: <20190624141721.GK47119@zxy.spb.ru> <30C12D55-56E1-43BC-90FE-D870BF811718@gromit.dlib.vt.edu> <20190624144239.GK2161@zxy.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 24, 2019, at 10:42 AM, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote: > On Mon, Jun 24, 2019 at 10:35:03AM -0400, Paul Mather wrote: > >> On Jun 24, 2019, at 10:17 AM, Slawa Olhovchenkov <slw@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@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-stable >>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@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] I guess this works only on FreeBSD 12 and later, then. What version are you running? Cheers, Paul.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FAAD8578-A0FC-4320-B4FF-356E2A347252>