logging: don't use TimedRotatingFileHandler anymore
Replace it by entrouvert.logging.handlers.SysLogHandler
This commit is contained in:
parent
4c23c8abf3
commit
52f95e9765
|
@ -38,23 +38,12 @@ LOGGING = {
|
|||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'console'
|
||||
},
|
||||
'rotate_file': {
|
||||
'level': 'INFO',
|
||||
'class': 'logging.handlers.TimedRotatingFileHandler',
|
||||
'formatter': 'file',
|
||||
'filename': os.path.join(_PROJECT_PATH, 'mandaye.log'),
|
||||
# W[0-6] : weekly (0: Monday), D: day, ... (python doc)
|
||||
'when': 'W6',
|
||||
# Every week
|
||||
'interval': 1,
|
||||
# BackupCount (keep one year of log)
|
||||
'backupCount': 52
|
||||
},
|
||||
'syslog': {
|
||||
'level': 'INFO',
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'class': 'entrouvert.logging.handlers.SysLogHandler',
|
||||
'formatter': 'file',
|
||||
'address': '/dev/log'
|
||||
'address': '/dev/log',
|
||||
'max_length': 999,
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
|
@ -64,7 +53,7 @@ LOGGING = {
|
|||
'propagate': False,
|
||||
},
|
||||
'mandaye': {
|
||||
'handlers': ['console', 'rotate_file'],
|
||||
'handlers': ['console', 'syslog'],
|
||||
'level': 'DEBUG',
|
||||
'propagate': False,
|
||||
},
|
||||
|
|
|
@ -33,21 +33,9 @@ LOGGING = {{
|
|||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'console'
|
||||
}},
|
||||
'rotate_file': {{
|
||||
'level': 'INFO',
|
||||
'class': 'logging.handlers.TimedRotatingFileHandler',
|
||||
'formatter': 'file',
|
||||
'filename': os.path.join(_PROJECT_PATH, '{project_name}.log'),
|
||||
# W[0-6] : weekly (0: Monday), D: day, ... (python doc)
|
||||
'when': 'W6',
|
||||
# Every week
|
||||
'interval': 1,
|
||||
# BackupCount (keep one year of log)
|
||||
'backupCount': 52
|
||||
}},
|
||||
'syslog': {{
|
||||
'level': 'INFO',
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'class': 'entrouvert.logging.handlers.SysLogHandler',
|
||||
'formatter': 'file',
|
||||
'address': '/dev/log'
|
||||
}},
|
||||
|
@ -59,12 +47,12 @@ LOGGING = {{
|
|||
'propagate': False,
|
||||
}},
|
||||
'mandaye': {{
|
||||
'handlers': ['console', 'rotate_file'],
|
||||
'handlers': ['console', 'syslog'],
|
||||
'level': 'DEBUG',
|
||||
'propagate': False,
|
||||
}},
|
||||
'{project_name}': {{
|
||||
'handlers': ['console', 'rotate_file'],
|
||||
'handlers': ['console', 'syslog'],
|
||||
'level': 'DEBUG',
|
||||
'propagate': False,
|
||||
}},
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
python-entrouvert
|
||||
-f https://repos.entrouvert.org/python-entrouvert.git/
|
||||
beaker>=1.6
|
||||
pycrypto>=2.0
|
||||
lxml>=2.0
|
||||
|
|
5
setup.py
5
setup.py
|
@ -49,6 +49,9 @@ setup(name="mandaye",
|
|||
scripts=['scripts/mandaye-admin.py'],
|
||||
include_package_data = True,
|
||||
packages=find_packages(),
|
||||
install_requires=install_requires
|
||||
install_requires=install_requires,
|
||||
dependency_links = [
|
||||
'git+git://repos.entrouvert.org/python-entrouvert.git/#egg=python-entrouvert-9999.0',
|
||||
],
|
||||
)
|
||||
|
||||
|
|
Reference in New Issue