How is syslog output printed on TTY?

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sat Jul 4 11:25:02 UTC 2015


On July 3, 2015 10:34:49 PM GMT+02:00, john smith <wempwer at gmail.com> wrote:
>On 7/3/15, Laurent Bercot <ska-dietlibc at skarnet.org> wrote:
>> On 03/07/2015 13:53, john smith wrote:
>>> I wonder then where does this text come from? It may be specific to
>>> NOOBS but I am not sure.
>>
>>   When syslogd is not running, syslog() will send its output to
>> /dev/console, which is what you are observing.
>
>Oh, stupid me. I should have noticed openlog() with LOG_CONS a couple
>of lines above. Still so much to learn.
>
>One more question though: there is always a date printed before
>login[<PID>] so that the entire line look like this:
>
>Jan 1 00:01:36 login[515]: root login on 'tty2'
>
>I tested opensyslog() with exactly the same parameters as in
>loginutils/login.c on my Slackware box and date is not printed. There
>is applet_name used as an ident argument in Busybox but AFAIK it only
>contains applet name such as "login" without a date. So how is the
>date printed?

http://pubs.opengroup.org/onlinepubs/9699919799/functions/closelog.html
See timestamp.

HTH,



More information about the busybox mailing list