How is syslog output printed on TTY?

john smith wempwer at gmail.com
Fri Jul 3 20:34:49 UTC 2015


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?

-- 
<wempwer at gmail.com>


More information about the busybox mailing list