Skip to content

Instantly share code, notes, and snippets.

@circa10a
Last active September 27, 2019 01:08
Show Gist options
  • Save circa10a/648d9062212950f9b28dd1c22eb65cf2 to your computer and use it in GitHub Desktop.
Save circa10a/648d9062212950f9b28dd1c22eb65cf2 to your computer and use it in GitHub Desktop.
python example logger
#!/usr/bin/env python3
from logging import getLogger, basicConfig
def create_logger():
logger = getLogger(__name__)
basicConfig(format='[%(levelname)s] %(asctime)s %(message)s',
datefmt='%Y-%m-%dT%H:%M:%S', level='INFO')
return logger
logger = create_logger()
logger.info(F" IT'S WORKING \u2713 \u2705")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment