Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] syslog-ng: how to read the log files
Date: Tue, 17 Feb 2015 19:46:05
Message-Id: CADPrc83H3NAwVro7srsPvWNV_yiWSnTXStcJCwvqwWVCJTCkVw@mail.gmail.com
In Reply to: Re: [gentoo-user] syslog-ng: how to read the log files by covici@ccs.covici.com
1 On Tue, Feb 17, 2015 at 2:29 PM, <covici@××××××××××.com> wrote:
2 >
3 > Alexander Kapshuk <alexander.kapshuk@×××××.com> wrote:
4 >
5 > > On Tue, Feb 17, 2015 at 8:26 PM, lee <lee@××××××××.de> wrote:
6 > >
7 > > > Hi,
8 > > >
9 > > > how do you read the log files when using syslog-ng?
10 > > >
11 > > > The log file seem to be some sort of binary that doesn't display too
12 > > > well in less, and there doesn't seem to be any way to read them.
13 > > >
14 > > >
15 > > > --
16 > > > Again we must be afraid of speaking of daemons for fear that daemons
17 > > > might swallow us. Finally, this fear has become reasonable.
18 > > >
19 > > >
20 > > If you're talking about /var/log/messages, which is:
21 > > messages: data
22 > >
23 > > I use cat(1).
24 >
25 > I wonder if the OP is using systemd and trying to read the journal
26 > files?
27
28 Those live under /var/lib/journal (which you need to create; Gentoo doesn't
29 do it by default last time I saw), in the directory named after the machine
30 ID (cat /etc/machine-id). And there are several journal files, of the kind:
31
32 system@××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××.journal
33
34 I think it would be really difficult to mix up that with /var/log/messages.
35
36 I think it's just that some part of /var/log/messages got corrupted
37 (happens a lot of times), and therefore /usr/bin/less identifies it as a
38 binary files since it contains non-printable characters.
39
40 Regards.
41 --
42 Canek Peláez Valdés
43 Profesor de asignatura, Facultad de Ciencias
44 Universidad Nacional Autónoma de México

Replies