Skip to content

Instantly share code, notes, and snippets.

@optimistanoop
Created July 23, 2019 09:08
Show Gist options
  • Save optimistanoop/f4153409fb0e01c9f1bdd35456ff12f3 to your computer and use it in GitHub Desktop.
Save optimistanoop/f4153409fb0e01c9f1bdd35456ff12f3 to your computer and use it in GitHub Desktop.
python logging
import logging
sysdate = str(datetime.date.today())
logging.basicConfig(filename=sysdate+'.log',
filemode='a',
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt='%H:%M:%S',
level=logging.DEBUG)
logging.info('anp main')
logging.warning("faulty rtsp...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment