Chapter folders renamed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#logging6.py
|
||||
import logging
|
||||
import logging.config
|
||||
import yaml
|
||||
|
||||
with open('logging6.conf.yaml', 'r') as f:
|
||||
config = yaml.safe_load(f.read())
|
||||
logging.config.dictConfig(config)
|
||||
|
||||
logger = logging.getLogger('my_logger')
|
||||
|
||||
logger.error("This is an error message")
|
||||
logger.warning("This is a warning message")
|
||||
logger.info("This is a info message")
|
||||
logger.debug("This is a debug message")
|
||||
Reference in New Issue
Block a user