from logger import logger 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: django logger
import logging
logging.basicConfig(level=logging.WARNING)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# USE THIS
logger.debug('hello')