I use the logging just plasing logging.mylog('message')
in my different files.
And I have this format:
logging.basicConfig(format = u'[%(asctime)s] # %(levelname)-4s\t%(filename)s[LINE:%(lineno)d]\t%(message)s', level = logging.MYLOG)
I took the function addLoggingLevel from https://stackoverflow.com/a/35804945/4647888
and found that filename always printed as main.py because I declare addLoggingLevel function in this file. Never mind in which file "logging.mylog('message')" placed.
So my question is: how to add a custom logging level with full support of standard levels behavior and with no surprises?