Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] syslog-ng: how to read the log files
Date: Tue, 17 Feb 2015 23:55:00
Message-Id: 2933343.qtGMBbSiIJ@wstn
In Reply to: Re: [gentoo-user] syslog-ng: how to read the log files by Jan Sever
1 On Wednesday 18 February 2015 00:23:19 Jan Sever wrote:
2 > On 02/18/2015 12:13 AM, Peter Humphrey wrote:
3 > > On Tuesday 17 February 2015 22:51:55 Peter Humphrey wrote:
4 > >> On Tuesday 17 February 2015 20:41:06 Matti Nykyri wrote:
5 > >>>> On Feb 17, 2015, at 20:26, lee <lee@××××××××.de> wrote:
6 > >>>> how do you read the log files when using syslog-ng?
7 > >>>> The log file seem to be some sort of binary that doesn't display
8 > >>>> too
9 > >>>> well in less, and there doesn't seem to be any way to read them.
10 > >>>
11 > >>> This was discussed earlier on this list... Actually what syslog-ng
12 > >>> produces is plain text. There seemed to be a bug that creates some
13 > >>> binary (i.e. unreadable characters) and that causes less to
14 > >>> consider
15 > >>> files to be binary and show them incorrectly.
16 > >>
17 > >> Yes, that was me. I found that something had marked
18 > >> /var/log/messages
19 > >> as a binary file. There's nothing in it that can't be read, no
20 > >> mysterious characters or anything; it's just marked as binary. All
21 > >> you have to do is to move it, then cat it back into place. I did
22 > >> that
23 > >> with no ill effects.
24 > >
25 > > Actually, this is what I did, as I reported here on 26/12:
26 > >> 1. Boot rescue system and mount main system
27 > >> 2. # cd /mnt/main/var/log
28 > >> 3. # mv messages messages.bin
29 > >> 4. # strings messages.bin > messages
30 > >> 5. # rm messages.bin
31 > >> 6. Reboot.
32 >
33 > When I had similar problem, I changed threaded(yes) to threaded(no)
34 > in syslog-ng.conf and the problem disappeared. Maybe it helps you too.
35
36 Good idea. Sounds like a bug report is needed, unless it's already been
37 superseded.
38
39 --
40 Rgds
41 Peter.