Note that there are some explanatory texts on larger screens.

plurals
  1. POlogging.fileConfig() acting weird on Google app engine
    primarykey
    data
    text
    <p>I have a simple webapp2 app on Google app engine. Here is the code</p> <pre><code># log.py......................................................................... logging_defaults = { 'loglevel': 'DEBUG', } logging_config = """\ [loggers] keys=root [handlers] keys=stderr [formatters] keys=default [logger_root] level=%(loglevel)s handlers=stderr [handler_stderr] class=StreamHandler level=NOTSET formatter=default args=(sys.stderr, ) [formatter_default] format=%(asctime)s %(levelname)s %(name)s:%(lineno)d %(message)s datefmt= """ import logging import logging.config import logging.handlers from cStringIO import StringIO config_file = StringIO(logging_config) logging.config.fileConfig(config_file, logging_defaults) l = logging.getLogger(__name__) # helloworld.py...................................................... import webapp2 from log import l class MainPage(webapp2.RequestHandler): def get(self): l.debug('debug message') l.info('info message') l.warn('warn message') l.error('error message') l.critical('critical message') self.response.headers['Content-Type'] = 'text/plain' self.response.write("hello me!! It's me here ;)") app = webapp2.WSGIApplication([('/', MainPage)], debug=True) </code></pre> <p>And here is the screen-shot of the logs produced in app engine dashboard</p> <p><img src="https://i.stack.imgur.com/4SAnh.png" alt="log-screenshot"></p> <p>As you can see the logs show up fine, but every log is marked with 'E' which represents error even if it's not an error. And as far as I can tell this happens everytime I use</p> <pre><code>logging.config.fileConfig() </code></pre> <p>Is there a fix to this problem ?</p> <p>PS: I know there are other methods to configure logging. But I am asking for fileConfig() only.</p> <p>UPDATE: I tried using loading from a real file with fileConfig() and using dictConfig() but each time the problem persists.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload