I was wondering what am I doing wrong since all my (debug) logs from my 
Python/Django app under GAE appears as Errors in the GAE logs? 

My Django logging setup is:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'formatters': {
        'verbose': {
            'format': '[%(asctime)s] %(levelname)s <%(name)s>: %(message)s',
            },
        'simple': {
            'format': '[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s'
            },
        },
    'filters': {
        },
    'handlers': {
        'null': {
            'level': 'DEBUG',
            'class': 'django.utils.log.NullHandler',
            },
        'console':{
            'level':'DEBUG',
            'class':'logging.StreamHandler',
            'formatter': 'simple'
            },
        'mail_admins': {
            'level': 'ERROR',
            'class': 'django.utils.log.AdminEmailHandler',
            'filters': []
            }
        },
    'loggers': {
        'django': {
            'handlers':['console'],
            'propagate': True,
            'level':'INFO',
            },
        'vision-api-poc': {
            'handlers':['console'],
            'propagate': False,
            'level':'DEBUG',
            },
        }
}


And this is how I'm using the logging interface:

import logging
log = logging.getLogger("vision-api-poc")

log.debug("Image size after resize: %s" % unicode(im.size))

And this is how it looks like in the GAE logs (the two exclamation marks + 
orange bg is an Error according to the browser mouseover):

<https://lh3.googleusercontent.com/-lDBOkVKgD_k/V06gee3ezJI/AAAAAAAAGLU/VYJGoa0JNdkslKi7QR3jiiPLwi63zKumACLcB/s1600/Screen%2BShot%2B2016-06-01%2Bat%2B11.43.29.png>

Is this normal? Should I bypass the django logging setup and just use 
logging.debug("foo") directly?

- Matti

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/722d169d-22df-4bf7-8f58-6afba3c3a485%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Matti Dahlbom

Reply via email to