blob: a189aebb349fc3c87fed99b046c3824049e22720 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import logging
import sys
formatter = logging.Formatter("[%(name)s] %(levelname)s: %(message)s")
stdout_handler = logging.StreamHandler(sys.stdout)
def get_logger(module):
log = logging.getLogger(module)
log.addHandler(stdout_handler)
stdout_handler.setFormatter(formatter)
log.setLevel(logging.DEBUG)
return log
|