[syslog-ng]Re: Problem with syslog-ng and Sys::Syslog

Jarkko Hietaniemi syslog-ng@lists.balabit.hu
Sat, 6 Sep 2003 00:38:56 +0300


On Sat, Sep 06, 2003 at 12:05:10AM +0300, Jyri Hovila wrote:
> Hi!
> 
> (Jarkko: Sori että häiritsen sinua tällaisella. Ajattelin että
> saattaisit olla kiinnostunut.)
> 
> I'm having a weird problem with syslog-ng (version 1.5.24) and Perl
> module Sys::Syslog. I use Perl 5.8.0 and OpenBSD 3.3.
> 
> When logging a timestamp using Sys::Syslog, it gets corrupted:
> 
>    This: syslog('local3|info',"TESTING - 12:34:56");
> 
>    Turns into this: Sep  5 23:49:12 my.server.com root: TESTING - 12: 34:56
> 
> Notice the extra space between "12:" and "34". The problem does *not*
> occur if I do ``logger -p local3.info "TESTING - 12:34:56"''.

Hmmm... let me guess: you didn't do an openlog() first?  Namely,
if that is not done, syslog() seems to try to extract the "ident"
(the tag prepended to every message) from the syslog message.
In the case it guessed your ident to be "TESTING - 12".

> I don't know if the problem is actually within syslog-ng or Sys::Syslog.
> 
> Any ideas what could be wrong and how it could be fixed?
> 
> Thanks! =)
> 
> - Jyri
> 
> 

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen