error-logging

Python Logging – How to inherit root logger level & handler

Python Logging – How to inherit root logger level & handler Question: I am a python newbie, trying to implement logging into my code. I have two modules main.py submodule.py main.py import logging from logging.handlers import RotatingFileHandler import submodule import logging from logging.handlers import RotatingFileHandler logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) fh = RotatingFileHandler(‘master.log’, maxBytes=2000000, backupCount=10) formatter …

Total answers: 1

Making Python loggers output all messages to stdout in addition to log file

Making Python loggers output all messages to stdout in addition to log file Question: Is there a way to make Python logging using the logging module automatically output things to stdout in addition to the log file where they are supposed to go? For example, I’d like all calls to logger.warning, logger.critical, logger.error to go …

Total answers: 11

How do you log server errors on django sites

How do you log server errors on django sites Question: So, when playing with the development I can just set settings.DEBUG to True and if an error occures I can see it nicely formatted, with good stack trace and request information. But on kind of production site I’d rather use DEBUG=False and show visitors some …

Total answers: 7