Package: dsyslog
Version: 0.5.0
Severity: important
Tags: patch

Using the regular output_file method, my logs are showing up like this:

Apr 28 15:14:26 pond postfix/qmgr:  6153A15B91: from=<[email protected]>, 
size=527, nrcpt=1 (queue active)
Apr 28 15:14:26 pond postfix/smtp:  setting up TLS connection to 4.2.2.2

Looks normal, except for the extra space between the program name and
the message itself. This should look like this instead:

Apr 28 15:14:26 pond postfix/qmgr: 6153A15B91: from=<[email protected]>, 
size=527, nrcpt=1 (queue active)
Apr 28 15:14:26 pond postfix/smtp: setting up TLS connection to 4.2.2.2

What would normally be a minor aesthetic issue actually turned into a
pile of logcheck errors as logcheck doesn't expect that extra space to
be there :)

I poked around in the source and I found the following line in output_file.c:
     ret = fprintf(f, "%s %s %s: %s\n", event->datestamp, event->source, 
event->program, event->message);

Removing the space between the colon and the following %s makes the
logs show up without the extra space. 

I suspect that the right thing to do is figure out why there is a
leading space in the event->program and eliminate it, but I could not
find why that %s had a space in front of it, but my familiarity with
the code is pretty minimal. 

Otherwise its likely the other modules will need this tweak (at least
output_tcp and output_udp will likely have this issue as they also
have similiar print lines).

micah



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-vserver-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dsyslog depends on:
ii  libc6                         2.9-7      GNU C Library: Shared libraries
ii  libglib2.0-0                  2.20.1-1   The GLib library of C routines
ii  libgnutls26                   2.6.5-1    the GNU TLS library - runtime libr

Versions of packages dsyslog recommends:
ii  logrotate                     3.7.7-3    Log rotation utility

Versions of packages dsyslog suggests:
pn  dsyslog-module-gnutls         <none>     (no description available)
pn  dsyslog-module-mysql          <none>     (no description available)
pn  dsyslog-module-postgresql     <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to