mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
17 lines
329 B
Python
17 lines
329 B
Python
import logging, sys
|
|
|
|
# store the debug flag at module level
|
|
debug = False
|
|
|
|
def init(pdebug):
|
|
global debug
|
|
debug = pdebug
|
|
|
|
if debug == True:
|
|
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
|
|
else:
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
def get(name):
|
|
return logging.getLogger(name)
|