KS2011: Structured error logging
KS2011: Structured error logging
Posted Oct 25, 2011 7:08 UTC (Tue) by Cyberax (✭ supporter ✭, #52523)In reply to: KS2011: Structured error logging by dlang
Parent article: KS2011: Structured error logging
============
[Sat 26 Oct 2011] "Joe User" requested lmpp://myserver.dc=some.dc=com/service , "SUCCESS" has been returned.
============
How should we parse it? Well, let's start with the date. It can be parsed by regexps, but it's already some amount of code.
Then there's user name. It can't be parsed by regexps at all (because of quoting, for example "Joe \"the mad\" User"). Then there's URL, which also can not be reliably parsed by regexps. And then finally the exit code which luckily is just a pre-defined string.
It's _really_ _really_ easy to make log unparseable accidentally. And given that quite a lot of log messages are printed only during exceptional/error conditions you might not discover it until it's too late.
So something which just CAN NOT be misused is sorely needed.
