Created
April 26, 2021 08:48
-
-
Save AsharFatmi/4820353eb761752102f840c7240a081a 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
import logging | |
def logInfoDetils(info): | |
logging.basicConfig( | |
format='%(asctime)s -- {%(levelname)s} ==> %(message)s', level=logging.INFO) | |
logging.info(info) | |
pass | |
def logErrDetails(err): | |
# logging.basicConfig(format='%(date)d-%(levelname)s-%(message)s') | |
logging.basicConfig( | |
format='%(asctime)s -- %(levelname)s ==> %(message)s') | |
logging.error(err) | |
pass | |
if __name__ == "__main__": | |
logInfoDetils("thisisInfo") | |
logErrDetails("Wassup") | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment