Package: syslog-ng
Severity: important

If you set "options { sync(X) }" to a value of X > 0, syslog-ng will
effectively lose X lines of logging. For instance, setting this to
10 will cause syslog-ng to buffer 10 lines of log output. On
shutdown, I'd expect it to write to lines to the logs, which it
*does not*! Thus, these 10 lines are effectively lost!

Check this out:

wall:~# for i in 10 100 200 400 800; do
          echo "*** sync($i) ***"
          sed -i -e "s,sync(.*),sync($i)," /etc/syslog-ng/syslog-ng.conf
          /etc/init.d/syslog-ng start &> /dev/null
          for j in `seq 0 $i`; do
            logger $i/$j
          done
          sleep 5
          /etc/init.d/syslog-ng stop &>/dev/null
          tail -3 /var/log/syslog
        done
        
*** sync(10) ***
Mar 14 08:13:44 wall root: 10/5
Mar 14 08:13:44 wall root: 10/6
Mar 14 08:13:44 wall root: 10/7
*** sync(100) ***
Mar 14 08:13:50 wall root: 100/92
Mar 14 08:13:50 wall root: 100/93
Mar 14 08:13:50 wall root: 100/94
*** sync(200) ***
Mar 14 08:13:55 wall root: 200/192
Mar 14 08:13:55 wall root: 200/193
Mar 14 08:13:55 wall root: 200/194
*** sync(400) ***
Mar 14 08:14:01 wall root: 400/392
Mar 14 08:14:01 wall root: 400/393
Mar 14 08:14:01 wall root: 400/394
*** sync(800) ***
Mar 14 08:14:08 wall root: 800/792
Mar 14 08:14:08 wall root: 800/793
Mar 14 08:14:08 wall root: 800/794

I cannot really figure out an equation for the number of lines lost,
but you can see that the last few go to neverneverland.

-- System Information:
Debian Release: testing/unstable
  APT prefers stable
  APT policy: (700, 'stable'), (600, 'testing'), (98, 'unstable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

-- 
 .''`.     martin f. krafft <[EMAIL PROTECTED]>
: :'  :    proud Debian developer and author: http://debiansystem.info
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP (sub)keys? Use subkeys.pgp.net as keyserver!
 
god is dead.
    -- nietzsche
nietzsche is dead.
    -- god
nietzsche is god.
    -- dead

Attachment: signature.asc
Description: Digital signature (GPG/PGP)

Reply via email to