This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from sys import stdout | |
# Define logger | |
logger = logging.getLogger('mylogger') | |
logger.setLevel(logging.DEBUG) # set logger level | |
logFormatter = logging.Formatter\ | |
("%(name)-12s %(asctime)s %(levelname)-8s %(filename)s:%(funcName)s %(message)s") | |
consoleHandler = logging.StreamHandler(stdout) #set streamhandler to stdout |