What I'd like for logging
Python's logging package is great and all, but it's only half of the solution.
I often find myself in a situation where I'd like to debug live processes, and that's pretty hard when they're FastCGI scripts or other daemons.
Sure, you could have a log file which you spam with information on a large scale, but that's not very helpful.
Sure, you could have N log files with individual output, but that's not very manageable.
What I'd like to have is a good log server which receives these masses of information, and couples every log line with arbitrary key-value pairs.
Then, you'd tap into the stream of information, specifying expressions that must hold true. For example, you could specify that "pid must be one of 1324, 1325, or 1326" and that "level must be above 10".
That way, you'd be able to narrow down one process, and only the output you'd like to have. You'd also avoid having to store all data -- if nothing taps the log lines received, they're simply discarded (or stored to disk based on arbitrary conditions).
$ logtap 'pid in (1234, 1235, 1236) and level > 10' 20:26:01,513 INFO foo.bar: the fox is now red [etc.]
Comments
