"Jan Sever" <n...@email.cz> writes:

> On 02/19/2015 08:02 PM, Fernando Rodriguez wrote:
>> On Tuesday, February 17, 2015 7:26:05 PM lee wrote:
>>> Hi,
>>>
>>> how do you read the log files when using syslog-ng?
>>>
>>> The log file seem to be some sort of binary that doesn't display too
>>> well in less, and there doesn't seem to be any way to read them.
>>>
>>>
>>>
>> 
>> You can just pipe the output of strings /var/log/messages to less. You can
> use 
>> strings(1) for systemd  journal files also.
>
> Yeah and you can check whether it contains any binary data by
> diff <(strings /var/log/messages) /var/log/messages

Well, yes; see it this way:

I never used syslog-ng before.  When I had to fix some problems, I
wanted to read the log files.  Less showed them in some hexl-mode, and
it has never done anything like that before.  I didn't even know that it
has this hexl-mode.

So I googled for how to read those log files because I figured that
syslog-ng perhaps uses some stupid binary format and that there might be
some program you're supposed to read them with.  That didn't turn up
anything and it really sucked.

How am I supposed to know that there's a combination of a three-year-old
bug and totally unexpected behaviour of less preventing me from reading
these logs?


Try something like 'less /boot/vmlinuz-3.17.8-gentoo-r1' and you don't
get hexl-mode.  Why such a surprise when trying to read a log file?


-- 
Again we must be afraid of speaking of daemons for fear that daemons
might swallow us.  Finally, this fear has become reasonable.

Reply via email to