Created
April 20, 2023 06:25
-
-
Save goddoe/0bb2753398928e9ef6e6f66eb17bbd8e to your computer and use it in GitHub Desktop.
logging
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
import logging | |
import sys | |
# Setup logging | |
logging.basicConfig( | |
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s", | |
datefmt="%m/%d/%Y %H:%M:%S", | |
handlers=[logging.StreamHandler(sys.stdout)], | |
) | |
logger = logging.getLogger(__name__) | |
# logger.setLevel(log_level) | |
logger.warning("warning") | |
logger.info("info") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment