below is the logging config in setting.py.  only the newest logs in the
output file.. It seems the log file is overwrite when new process been
forked

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,

    'formatters': {
        'standard': {
            'format': '%(levelname)s %(asctime)s %(module)s %(lineno)d
%(message)s'
        },
        'detail': {
            'format': '%(levelname)s %(asctime)s %(pathname)s %(lineno)d
%(message)s'
        }
    },
    'handlers': {
        'frontend': {
            'level': 'INFO',
            'formatter': "standard",
            'class': 'logging.handlers.TimedRotatingFileHandler',
            'when': 'MIDNIGHT',
            'filename': '/deploy/logs/log.txt'
        },
        'error': {
            'level': 'INFO',
            'formatter': "detail",
            'class': 'logging.handlers.TimedRotatingFileHandler',
            'when': 'MIDNIGHT',
            'filename': '/deploy/logs/error.txt'
        },
        'stat': {
            'level': 'INFO',
            'formatter': "standard",
            'class': 'logging.handlers.TimedRotatingFileHandler',
            'when': 'MIDNIGHT',
            'filename': '/deploy/logs/stat.txt'
        }
    },
    'loggers': {
        'frontend': {
            'handlers': ['frontend'],
            'level': 'INFO',
            'propagate': True,
            },
        'error': {
            'handlers': ['error'],
            'level': 'INFO',
            'propagate': True,
            },
        'stat': {
            'handlers': ['stat'],
            'level': 'INFO',
            'propagate': True,
            },
        }
}



-- 
Pursuit the freedom of the soul.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to