Mysterious Logging Handlers

Josh English Joshua.R.English at gmail.com
Mon Sep 12 12:12:48 EDT 2016


On Friday, September 9, 2016 at 11:31:13 AM UTC-7, Peter Otten wrote:
> Josh English wrote:
> 
> > 
> > LOG = logging.getLogger('SHIPPING')
> > FORMAT = '%(asctime)-15s %(name)s %(level)-8s %(message)s'
> 
> That should be either levelname or levelno in the format string.

Yeah, I caught that after I tried running the script in a dedicated console in Spyder, and my logging worked as expected. I got the format and whole bunch of errors about this.


> > 
> > Even more mysterious, after I run the file (in an IDE so I have a REPL
> > afterwards), I have:
> 
> Don't run your code in an IDE. The interaction between your and their code 
> can make debugging harder than necessary.

I suspect the IDE was the problem, because the dedicated console option solved the problem.

Thanks,

Josh



More information about the Python-list mailing list