you are using TimedRotatingFileHandle, so it will rotate your log into a new 
file with the name as xxx.20120810, and start store new entries in 'filename'( 
stat.txt, error.txt)

--  
Sincerely,
Pengfei Xue





已使用 Sparrow (http://www.sparrowmailapp.com/?sig)

已使用 Sparrow (http://www.sparrowmailapp.com/?sig)  

在 2012年8月10日星期五,下午12:14,DanYun Liu 写道:

> 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 
> (mailto:django-users@googlegroups.com).
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com 
> (mailto:django-users+unsubscr...@googlegroups.com).
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
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