From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/517 Path: main.gmane.org!not-for-mail From: Csillag =?iso-8859-2?Q?Tam=E1s?= Newsgroups: gmane.comp.sysutils.supervision.general Subject: syslog from perl but no date (svlogd) Date: Fri, 16 Jul 2004 00:21:09 +0200 Message-ID: <20040715222109.GE7203@digitus> Reply-To: Csillag =?iso-8859-2?Q?Tam=E1s?= NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 X-Trace: sea.gmane.org 1089930096 22391 80.91.224.253 (15 Jul 2004 22:21:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2004 22:21:36 +0000 (UTC) Original-X-From: supervision-return-755-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jul 16 00:21:24 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1BlEbS-0002JH-00 for ; Fri, 16 Jul 2004 00:21:22 +0200 Original-Received: (qmail 9930 invoked by uid 76); 15 Jul 2004 22:21:40 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 9924 invoked from network); 15 Jul 2004 22:21:40 -0000 Original-To: supervision@list.skarnet.org Content-Disposition: inline X-Operating-System: Gnu/Linux X-PPKE-NOSPAM: I promise, I will never let anything happen to you. Nemo. User-Agent: Mutt/1.5.5.1+cvs20040105i X-PPKE-ITK-MailScanner: Found to be clean X-PPKE-ITK-MailScanner-SpamCheck: not spam, SpamAssassin (pont=-11.298, szukseges 5, autolearn=not spam, AWL 3.60, BAYES_00 -4.90, LOCAL_PPKE -10.00) Xref: main.gmane.org gmane.comp.sysutils.supervision.general:517 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:517 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