Skip to content

Instantly share code, notes, and snippets.

@chfle
Last active January 15, 2019 13:33
Show Gist options
  • Save chfle/fd4551c4ba54790f9d00a0e8a986aa37 to your computer and use it in GitHub Desktop.
Save chfle/fd4551c4ba54790f9d00a0e8a986aa37 to your computer and use it in GitHub Desktop.
logger python for IntelliJ IDEA
import logging
logging.basicConfig(
format='%(asctime)s '
'[%(filename)s]:'
'%(lineno)d] [%(levelname)s] '
'[%(funcName)s():%(lineno)s] '
'[PID:%(process)d TID:%(thread)d]: '
'%(message)s',
level=logging.DEBUG,
filename='logs.txt')
logger = logging.getLogger('your_logger')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment