make sure control-port-filter-python exceptions end up in journal


ID: 603
PHID: PHID-TASK-7fu367664lj4xwwqof7e
Author: Patrick
Status at Migration Time: resolved
Priority at Migration Time: Normal


This is an exception I forced by purposely adding a bug for demonstration purposes. (Renaming a respond to espond.)

When running the filter from the command line, once can see any python exception it throws.

Exception happened during processing of request from ('', 45690)
Traceback (most recent call last):
  File "/usr/lib/python3.4/", line 613, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.4/", line 344, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.4/", line 669, in __init__
  File "/usr/lib/tor-controlport-filter", line 637, in handle
  File "/usr/lib/tor-controlport-filter", line 497, in handle_controlport_session
    espond("250 OK")
NameError: name 'espond' is not defined

But when one is running it as a systemd service and looks into sudo journalctl -f -u tor-controlport-filter, then python exceptions do not end up in the journal.



2017-01-13 13:02:28 UTC


2017-01-13 14:57:33 UTC