On Jun 15, 2013, at 8:33 AM, Christopher Armstrong <ra...@twistedmatrix.com> 
wrote:

> It sounds like you're arguing that the human-readable *.log format
> should be closer to the simple key/value representation that we use
> underneath.
> 
> Would you also argue that instead of having a log line that looks like:
> 
> 2013-06-15 10:24:21-0500 [-] Server Shut Down.
> 
> We should actually format them (in twistd.log) like this?
> 
> time=1371331461.0 system='-' msg='Server Shut Down.'


I'm actually arguing that, in the log *file* it should look like this:

{"log_format": "{service} service shut down.", "log_system": "-", "log_time": 
1371331461.0, "service": "dns"}

When a human actually reads it (with, as a straw man, 'python -m 
twisted.python.log read twistd.log.json'), I'd rather it still read somewhat 
like the above starting '2013...': except, for example, with the time 
translated into their local timezone (or the timezone of the computer where 
they're reading the logs, at least).

But I'm not saying that we should change the default twistd.log format for now; 
I'm sure there's tons of tooling built up around the ad-hoc text-based nature 
of it as it is and I wouldn't want to break that.  I'm just saying that we 
should add additional options for logging to things other than plain text 
files, and those are the things that we should build tools to get information 
back out of.

-glyph
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to