Page MenuHomePhabricator

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


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.



Event Timeline

Kindly review

One line change will make sure that the python exceptions are logged and seen using sudo journalctl -f -u tor-controlport-filter

Works for me! Merged.

Does -e have any disadvantages? If not, we should probably enable this for sdwdate also.