Gentoo Archives: gentoo-user

From: lee <lee@××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] syslog-ng: how to read the log files
Date: Tue, 17 Feb 2015 19:18:23
Message-Id: 87y4nwqren.fsf@heimdali.yagibdah.de
In Reply to: Re: [gentoo-user] syslog-ng: how to read the log files by Alan Mackenzie
1 Alan Mackenzie <acm@×××.de> writes:
2
3 > Hello, Lee.
4 >
5 > On Tue, Feb 17, 2015 at 07:26:05PM +0100, lee wrote:
6 >> Hi,
7 >
8 >> how do you read the log files when using syslog-ng?
9 >
10 >> The log file seem to be some sort of binary that doesn't display too
11 >> well in less, and there doesn't seem to be any way to read them.
12 >
13 > When I try "less /var/log/messages", less gives me what is basically a
14 > hex dump of the file. I'm assuming you see the same.
15
16 Yes, that's what I was looking at.
17
18 > less searches part of the buffer (presumably the first few KB) and if it
19 > finds non-printable characters, uses an input filter first to convert to
20 > the hex dump.
21
22 Is that a new feature of less? I've never had this problem with any
23 other file. IIRC, unprintable characters, like null, used to be
24 displayed like ^@, and less always did a great job in preventing the
25 display from needing a reset without switching to an equivalent of
26 hexl-mode.
27
28
29 BTW, what happens when something writes to /var/log/messages? I noticed
30 today that the default shorewall.conf that ships with gentoo has that
31 set as logfile for shorewall. Shouldn't all messages going into
32 /var/log/messages go to syslog-ng instead when syslog-ng is used, with
33 nothing else writing to this file?
34
35
36 --
37 Again we must be afraid of speaking of daemons for fear that daemons
38 might swallow us. Finally, this fear has become reasonable.

Replies

Subject Author
Re: [gentoo-user] syslog-ng: how to read the log files Mick <michaelkintzios@×××××.com>