[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Busybox Syslogd Format
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2016-10-07 14:17:14
Message-ID: CAK1hOcOE_K_uVAtvO9aJHsEUGXpKuTs+FZEccNc=GJD6EneCjg () mail ! gmail ! com
[Download RAW message or body]
On Wed, Oct 5, 2016 at 6:41 PM, Kevin Houlberg <khoulberg@evertz.com> wrote:
> Hello,
>
>
>
> Is it possible to change the date and time format of the syslog messages
> when using syslogd?
>
>
>
> Current format: Jan 01 02:04:40 user.info
> fpgaIOService[1391]: Ethernet port 1 is down
>
>
>
> Desired format: 2016-02-29T16:29:04.045Z user.info
> fpgaIOService[1391]: Ethernet port 1 is down
Unfortunately, timestamps in logs are produced by clients:
#include <syslog.h>
int main() {
syslog(LOG_INFO, "Hello");
return 0;
}
$ strace ./testprog
...
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
sendto(3, "<14>Oct 7 16:13:31 testprog: Hello", 35, MSG_NOSIGNAL, NULL, 0) = 35
^^^^^^^^^^^^^^^
What do you propose for syslog to do with underlined part of the message?
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic