Last active
May 24, 2020 14:20
-
-
Save davidohana/922be95cd45fceb71ba97d87aa7d762d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logger.info("Hello World") | |
logger.info("Request from {} handled in {:.3f} ms", socket.gethostname(), 11) | |
logger.info("Request from {} handled in {:.3f} ms", "127.0.0.1", 33.1) | |
logger.info("My favorite drinks are {}, {}, {}, {}", "milk", "wine", "tea", "beer") | |
logger.debug("this is a {} message", logging.getLevelName(logging.DEBUG)) | |
logger.info("this is a {} message", logging.getLevelName(logging.INFO)) | |
logger.warning("this is a {} message", logging.getLevelName(logging.WARNING)) | |
logger.error("this is a {} message", logging.getLevelName(logging.ERROR)) | |
logger.critical("this is a {} message", logging.getLevelName(logging.CRITICAL)) | |
logger.info("Does old-style formatting also work? %s it is, but no colors (yet)", True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment