I’m trying to save all my log messages to a file instead of displaying it on the console. Here’s the code I used:
LOG_FORMAT = "%(levelname)s %(asctime)s - %(message)s" logging.basicConfig( level = 'DEBUG', filename = 'debug.log', format = LOG_FORMAT) logger = logging.getLogger('jn') logger.warning('Testing warning') logger.debug('Testing debug')
The level kwargs seems to be the only one that get passed on because I get the debug and warning outputs in the console and not in the file, and it is not formatted as specified.
If anybody has any good reference for the use of the os module with Pythonista, I would take it as well. It doesn’t seem like we have all the permissions to do what we want with that module.
Thanks for your help,