Logger for worker
This commit is contained in:
@@ -17,7 +17,7 @@ logging.basicConfig(format='%(filename)s | PPID=%(ppid)s | %(levelname)s | %(asc
|
||||
logger = logging.getLogger("fetcher")
|
||||
# logger.setFormatter(logging.Formatter('%(levelname)s | PPID=%(ppid)s | %(asctime)s | %(message)s'))
|
||||
logger.addFilter(PPIDFilter())
|
||||
logger.setLevel(logging.DEBUG)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
# To file log: DEBUG / INFO / WARNING / ERROR / CRITICAL
|
||||
fh = logging.handlers.RotatingFileHandler(filename=os.path.join(logs_directory, "debug.log"), mode="a", maxBytes=10000000, backupCount=1)
|
||||
|
||||
Reference in New Issue
Block a user