problem getting logger and syslogd working together correctly

Denys Vlasenko vda.linux at googlemail.com
Mon Dec 7 00:27:44 UTC 2009


On Sunday 06 December 2009 02:36, Christopher Barry wrote:
> > When I do this:
> > 
> > shadow:~# logger -p user.debug -s -t ramfs "a message"
> > ramfs: a message
> > shadow:~# logger -p user.warning -s -t ramfs "a message"
> > ramfs: a message
> > 
> > I see this in logfile:
> > 
> > Dec  3 01:42:23 shadow user.debug ramfs: a message
> > Dec  3 01:42:32 shadow user.warn ramfs: a message
> > 
> > Do you? If not, run strace -oLOG logger -p user.debug -s -t ramfs 'a message'
> > and post LOG.
> 
> using BB logger against the syslog-ng on my dev box while I'm on my dev
> box works fine. logs to a file, and to the screen without issue. I get
> the same output as you do.
> 
> if I start BB syslogd on my dev box, it exhibits the same behavior as in
> the initramfs. BB logger outputs to screen only, and only with -s as
> expected. trace log attached.

It does talk to /dev/log:

writev(2, [{"fred: this is the message", 25}, {"\n", 1}], 2) = 26
socket(PF_FILE, 0x80002 /* SOCK_??? */, 0) = 3
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
send(3, "<14>Dec  2 21:37:31 fred: this i"..., 45, MSG_NOSIGNAL) = 45
close(3)                                = 0
exit_group(0)                           = ?


Let's strace the other end of it. Run
"logger -p user.debug -s -t ramfs 'a message'" again
while stracing the syslogd:

strace -oLOG2 -p <pid_of_sysligd>

and post the LOG2.
--
vda


More information about the busybox mailing list