An example of Python logging over a network, starting with an example from https://docs.python.org/2/howto/logging-cookbook.html.
This is very handy if you have a rack of servers and you want to aggregate logging statements from one or several of them to in some convenient place. This is especially handy if you're using an inversion-of-control framework (my own work these days is with Buildbot, which relies upon Twisted), because a lot of what's happening may be obscured, for instance by Deferreds but also possibly by
Output from this thing currently looks like this, but I'm interested in the possibility of throwing log records in an SQL database for purposes of sorting/filtering/searching, and presenting them with something like http://datatables.net.
------
6 localhost:root INFO
Jackdaws love my big sphinx of quartz.
------
7 localhost:myapp.area1 DEBUG
Quick zephyrs blow, vexing daft Jim.
------
7 localhost:myapp.area1 INFO
How quickly daft jumping zebras vex.
------
7 localhost:myapp.area2 WARNING
Jail zesty vixen who grabbed pay from quack.
------
7 localhost:myapp.area2 ERROR
The five boxing wizards jump quickly.
------
7 localhost:myapp.area1 ERROR
ouch
Traceback (most recent call last):
File "client.py", line 47, in <module>
1 / 0
ZeroDivisionError: integer division or modulo by zero
------
8 localhost:myapp.area2 INFO
File "client.py", line 59, in <module>
g()
File "client.py", line 57, in g
f()
File "client.py", line 53, in f
logger2.info(stack())