python logger.info code example
Example 1: logging.logger
import logging
logging.basicConfig(level=logging.WARNING)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.debug("some debugging...")
logger.error("some error...")
Example 2: python logging to console exqmple
import sys
# ...
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))