diff options
| author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-06-28 13:50:49 -0400 |
|---|---|---|
| committer | Zbyszek Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-12 11:02:30 +0200 |
| commit | 3eb019f875fc63eadfab29b4e0ad143409cf4cb2 (patch) | |
| tree | c9800273ce3a7171e9a5abe82ca8fdd78ddcbd1b /setup.py | |
| parent | 557184bb56240bfcf05d250e5bf9049eaf6d0ec5 (diff) | |
| download | python-systemd-3eb019f875fc63eadfab29b4e0ad143409cf4cb2.tar.gz | |
Use traceback module to specify CODE_{LINE,FUNC,FILE}
$python3 -c 'import journald; x = lambda: journald.send("tescik"); x()'
gives a message like:
MESSAGE=tescik
CODE_FILE=<string>
CODE_LINE=1
CODE_FUNC=<lambda>
_TRANSPORT=journal
...
This makes the CODE_* fields much more useful: before they would
always give the location of the sd_journald_sendv() call in the module
source, and now they specify the location of the caller of
journald.send().
When using the low-level journald.sendv() is becomes the
responsibility of the caller to specify the CODE_* fields.
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions
