0

Recently I added a logging mechanism to my django application 1.3 using the following setting

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
        },
        'simple': {
            'format': '%(levelname)s %(message)s'
        },
    },
    'handlers': {
        'mail_admins': {
            'level': 'ERROR',
            'class': 'django.utils.log.AdminEmailHandler'
        },
        'debug':{
            'level':'DEBUG',
            'class':'logging.FileHandler',
            'formatter': 'verbose',
            'filename': base('logs/app_log/developer.debug.log') if ENV ==1 else base('../../logs/app_log/developer.debug.log'),
        },
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
        'mz.debug': {
            'handlers': ['debug'],
            'level': 'DEBUG',
            'propagate': True,
        },
    }
}

this settings works perfectly on my local machine but once I deploy to the server the get the following error

[Sun Jul 24 06:37:04 2011] [error] Exception KeyError: KeyError(-1218405744,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored

when I remove the logging settings from the server it works fine. I don't know what in my settings that drives the server to return such an error and how would I solve this? many thanks

2 Answers 2

3

Google search

First hit

Update mod_wsgi.

Sign up to request clarification or add additional context in comments.

Comments

1

Update your Apache's mod_wsgi to 3.3. I use Ubuntu 10.04, and as of this writing, the package hasn't been updated. So I built from source. Make sure to disable mod_wsgi before you install the newer version 3.3. I didn't do this and my Apache crashed with error:

seg fault or similar nasty error detected in the parent process

1 Comment

That would be a different issue to what the question is about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.