Deployments and python logging module


I have a python repl that I deployed as a background worker. This repl normally was run as an always on repl and I made use of the python logging module to save errors and exceptions to a .log file. I noticed that after I deployed this project I don’t think the error logging will really be accessible to me. There is a log for a deployment but as far as I can tell it only captures print statements and nothing to do with the actual logging module. I am just curious if this is how it is supposed to be or if there is a way for actual logging to work along with deployments.

Hi @avataraustin , welcome to the forums!
I don’t think the logging helps. Try replacing all the logging writing code with print() instead, to save it to the Deployment Logs.
Hope this helps!

1 Like

That won’t work in deployments, as the filesystem isn’t persistent, and you can’t access it regardless.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.