12 lines
376 B
Python
12 lines
376 B
Python
|
import logging
|
||
|
|
||
|
console_logger = logging.StreamHandler()
|
||
|
console_formatter = logging.Formatter(
|
||
|
"%(asctime)-15s.%(msecs)03d :: [%(levelname)8s] :: %(name)-15s :: %(message)s (%(filename)s:%(lineno)s)",
|
||
|
"%Y-%m-%d %H:%M:%S")
|
||
|
# setup logger
|
||
|
console_logger.setFormatter(console_formatter)
|
||
|
log = logging.getLogger("rc")
|
||
|
log.addHandler(console_logger)
|
||
|
log.setLevel(logging.INFO)
|