Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29342 - Compressed old log files re-formatted to fixed line length - syslog-ng logrotate gzip
Summary: Compressed old log files re-formatted to fixed line length - syslog-ng logrot...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-22 09:59 UTC by Heribert Slama
Modified: 2003-09-22 18:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heribert Slama 2003-09-22 09:59:27 UTC
A few weeks ago I replaced "syslog" with "syslog-ng" plus "logrotate" using the 
Gentoo supplied _default config_ files (everything to /var/log/message, rotated 
weekly). 
 
Big surprise when looking into /var/log/messages.?.gz for the first time! All lines are 
re-formatted to a fixed length of 66 chars. The original line breaks are removed, split 
words are _hyphenated_ (ridiculous)! The current /var/log/message looks completely 
normal. So "logrotate" is the most likely culprit. 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



tower(s1) root # emerge info 
Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4, 2.4.19) 
================================================================= 
System uname: 2.4.19 i686 Pentium III (Coppermine) 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-march=pentium3 -O3 -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config 
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/kde/3/share/config 
/usr/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-march=pentium3 -O3 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="sandbox ccache autoaddcvs fixpackages" 
GENTOO_MIRRORS="ftp://sunsite.cnlab-switch.ch/mirror/gentoo/ 
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://distfiles.gentoo.org 
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="x86 oss avi crypt cups foomaticdb gif jpeg libg++ mad mikmod mmx mpeg 
ncurses nls pdflib png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang 
readline arts svga tcltk java guile X sdl gpm tcpd pam libwww ssl perl python esd 
imlib oggvorbis gnome gtk qt kde motif opengl mozilla cdr doc gtk2 nhc98 nocardbus 
oav rage128 samba snmp sse tiff usb -3dnow -apm -encode -quicktime -tetex" 
====================================================== 
 
*  app-admin/logrotate 
      Latest version available: 3.6.5-r1 
      Latest version installed: 3.6.5-r1 
*  app-admin/syslog-ng 
      Latest version available: 1.6.0_rc3-r1 
      Latest version installed: 1.6.0_rc3-r1 
*  sys-apps/gzip 
      Latest version available: 1.3.3-r2 
      Latest version installed: 1.3.3-r2
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-09-22 13:00:50 UTC
I have the same version of the three packages you list installed myself and
the log files are rotated as expected with no change to the log contents.

When you say, "when looking into /var/log/messages..." what do you mean?  What
did you use to look at the files?

Also, please attach the contents of your logrotate.conf as a text attachment
please so I can verify that we are running the same thing.

Thanks.
Comment 2 Heribert Slama 2003-09-22 18:11:46 UTC
Replying to Comment #1 --- 
 
I used Midnight Commander's internal file viewer (function key F3) to look into the log 
files. It has never let me down before - but this time it DID :-((  The log files are _OK_ 
and I have to _withdraw_ this bug report. I'm awfully sorry. 
 
 
Just to show you how treacherous this thing is---- 
/var/log/messages              is shown correctly (variable length lines) 
/var/log/messages.<n>.gz   is shown re-formatted (fixed length lines, split words 
hyphenated).  (<n> is a number.) 
I even tried the "Raw Data" toggle (F8), but this showed the gzipped file bytewise 
(garbage). 
 
After reading your comment #1 I gunzipped the old logs manually to bypass the 
auto-unzip function of mc's viewer but 
/var/log/messages.<n>    was still shown re-formatted.... 
But when I hit the "Raw Data" button (F8) the text just reverted to _normal_. I 
renamed a few other text files to <file>.<n> and got the same effect! 
 
I confirmed the correctness of the compressed log files using Konqueror->Ark->Kate. 
They look crisp & healthy;-) 
 
Midnight Commander uses file extensions to filter files for viewing.  And <file>.<n>[.gz] 
looks like a [compressed] _man page_, which has a fixed width and hyphenated split 
words on the right hand margin. I'll dig into mc's extension definition file "mc.ext" to see 
whether it is a bug or just a weakness of concept. 
 
Thank you for your fast response, and for putting me on the right track. 
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2003-09-22 18:19:13 UTC
Great!  I'm glad you figured it out and are back to viewing unmangled log
files again. ;-)

I'll go ahead and close this bug as INVALID then.