supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* syslog from perl but no date (svlogd)
@ 2004-07-15 22:21 Csillag Tamás
  2004-07-15 23:06 ` Charlie Brady
  0 siblings, 1 reply; 5+ messages in thread
From: Csillag Tamás @ 2004-07-15 22:21 UTC (permalink / raw)


Hi,

I am replacing syslogd with socklog on my server, I like it because it is
very clean and very simple.

The only problem I came across, is a date logging issue.
Let me explain: (I use socklog configuration created by socklog-conf)
If I run
# echo test | logger
The following line appears in the logs
user.notice: Jul 15 23:52:52 logger: test

But if I run the following perl script:

#!/usr/bin/perl

use Sys::Syslog qw(:DEFAULT setlogsock);

$syslog_socktype = 'unix'; # inet, unix, stream, console
$syslog_facility="mail";
$syslog_options="pid";
$syslog_priority="info";

setlogsock $syslog_socktype;
openlog $0, $syslog_options, $syslog_facility;
syslog $syslog_priority, "test";

The line is the following:
mail.info: example.pl[3449]: test

The problem is that the latter lack's the time/date information.
Most program works as expected but the perl based not.

I know that I can add a -t (or -tt) option to svlogd but it will add
time information to *all* lines AFAIK.

I do not know if this is a perl bug and syslogd works around the
problem, but it works right with it.

is something missing here?

Thanks in advance.

-- 
cstamas


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-17 10:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-15 22:21 syslog from perl but no date (svlogd) Csillag Tamás
2004-07-15 23:06 ` Charlie Brady
2004-07-16 22:43   ` Csillag Tamás
2004-07-17 10:27     ` Csillag Tamás
2004-07-17 10:59       ` Clemens Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).