Last active
January 15, 2019 13:33
-
-
Save chfle/fd4551c4ba54790f9d00a0e8a986aa37 to your computer and use it in GitHub Desktop.
logger python for IntelliJ IDEA
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 | |
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