On Tue, Jul 16, 2013 at 9:51 AM, Lennart Poettering <mzerqung@0pointer.de> wrote:
On Tue, 16.07.13 09:13, Dan Fruehauf (malkodan@gmail.com) wrote:

> > Well, there are certain things on Unix that are text files and many
> > things that are not. Binary log files have a long tradition on Unix, for
> > example in wtmp and utmp. We have binary files in /etc, and everywhere
> > else.
> >
> And the reason for that being? I have no idea either, it's probably too old
> to be dug. Howver yes, I'd like these to be text based as well.

Oh, the reasons are pretty well-known for those cases. For example
wtmp/utmp is binary so that utmp works nicely as sparse file and the
entries may be accessed using the UID number as seek index (multipled by
the fixed entry size). So, it's about indexing, exactly as for journal
files. The Unix guys back then chose binary when it made sense for their
immediate technical requirements. And for us it's the exact same.
 
What made sense back in the day is today yet another vague decision that was being dragged with us for decades - "because it made sense at the time". Going from text to binary is easy. Always easy to break things. Going back to text (if we want to) will be difficult. The above example is a really good one for why not to go binary, by all means.

> > journalctl is certainly not a "complex tool" to understand. Command
> > lines usually get shorter by using it rather than the equivalent for
> > /var/log/messages.
> >
> People might also argue the event viewer in windows is not a "complex
> tool". See where it got them. Mind you event viewer is probably a bit more
> mature than journalctl.

Well, if I cannot convince you to even try it out, and you insist on
conflating the windows log viewer with journalctl (which is about as
smart as conflating microsoft word with vi), then I guess there's no
point in discussing this with you.
 
Perhaps there isn't. On the day I will boot a Linux system and have no /var/log/messages out of the box, it'll be time for a change.

By all means any windows person I know would much rather have logs as plain text. Not the other way around.


> > > Lets try to keep things simple. This is why we use Fedora. This is why I
> > > use Fedora.
> >
> > We are certainly making things simpler by introducing nice query tools
> > like journalctl and by reducing the number of packages we install by
> > default, and by removing redundancy.
> >
> Nice query tools? Lets go with a RDBMS to store the logs then?

Nobody suggests that.
 
What's wrong with RDBMS? You only need to "echo 'select * from log' | SOME_SQL_PROGRAM | less", it's exactly the same and you also have all the querying capabilities of a RDBMS.

> And for a short story about a system (I had nothing to do with) which based
> their log files in a RDBMS and their configuration in XML format. Failed
> miserably. The end.

We do neither.
 
You do neither, but you follow the very same path.


> Another question while we're at it - what happens if and when you decide to
> change your binary format for storing files for whatever reason? Is that
> when we understand that we should have been left with just text based files?

We documented the format, and it is quite extensible. The sources are
open. Altogether this are the best guarantees that the stuff stays
stable and accessible.
Thanks, I'd still prefer it text.

Lennart

--
Lennart Poettering - Red Hat, Inc.