Skip to content

Instantly share code, notes, and snippets.

@AsharFatmi
Created April 26, 2021 08:48
Show Gist options
  • Save AsharFatmi/4820353eb761752102f840c7240a081a to your computer and use it in GitHub Desktop.
Save AsharFatmi/4820353eb761752102f840c7240a081a to your computer and use it in GitHub Desktop.
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