Right now we have a number of places that do something like
msg = "Some error message"
error_channel.log(msg)
raise ValueError(msg)
but that way journal is set up, anything logged to the error channel or higher (the fatal channel) will raise it's own python error:
( in testjournal.py)
import journal
error_channel = journal.error('test')
error_channel.log("This is a test error message")
raise ValueError("This will never be raised")
$ python testjournal.py
journal: This is a test error message
Traceback (most recent call last):
File "/Users/staniewi/repos/testjournal.py", line 3, in <module>
error_channel.log("This is a test error message")
journal.ext.journal.ApplicationError: test: application error
I think we have two options
- simply remove the
raise .... statements after all our logging with journal to the error channel
- if we want the specific python error (like
ValueError, OSError, PermisionsError) to be raised, we'll need to change which channel we're logging two
I only bring up 2 as an option because the error raised will always be a journal.ext.journal.ApplicationError
Right now we have a number of places that do something like
but that way
journalis set up, anything logged to theerrorchannel or higher (the fatal channel) will raise it's own python error:( in
testjournal.py)I think we have two options
raise ....statements after all our logging with journal to the error channelValueError, OSError, PermisionsError) to be raised, we'll need to change which channel we're logging twoI only bring up 2 as an option because the error raised will always be a
journal.ext.journal.ApplicationError