forked from Cryz/battle_royale_sim
add logging lib
This commit is contained in:
19
utils/logs.py
Normal file
19
utils/logs.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import logging as _logging
|
||||
|
||||
logger = _logging.getLogger(__name__)
|
||||
_logging.basicConfig(filename= 'battle_royale.log', encoding= 'utf-8', level= _logging.DEBUG)
|
||||
|
||||
def log_debug(txt):
|
||||
logger.debug(txt)
|
||||
|
||||
def log_info(txt):
|
||||
logger.info(txt)
|
||||
|
||||
def log_warning(txt):
|
||||
logger.warning(txt)
|
||||
|
||||
def log_error(txt):
|
||||
logger.error(txt)
|
||||
|
||||
def log_critical(txt):
|
||||
logger.critical(txt)
|
||||
Reference in New Issue
Block a user