Commit 6aa66ed7 authored by Vangelis Koukis's avatar Vangelis Koukis
Browse files

Update default logging settings

parent c4ddb720
......@@ -61,13 +61,18 @@ and is broken in 4 separate dictionaries:
* DISPATCHER_LOGGING is the logging configuration of the logic/dispatcher.py
command line tool.
* RECONCILIATION_LOGGING is the logging configuration of the
logic/reconciliation.py command line tool.
* SNFADMIN_LOGGING is the logging configuration of the snf-admin tool.
Consider using matching configuration for snf-admin and the synnefo.admin
logger of the web app.
Please note the following:
* As of Synnefo v0.7, by default the Django webapp logs to syslog, the
dispatcher logs to /var/log/synnefo/dispatcher.log and the console,
snf-admin logs to the console.
* Different handlers can be set to different logging levels:
for example, everything may appear to the console, but only INFO and higher
may actually be stored in a longer-term logfile.
Admin Tools
===========
......
......@@ -132,10 +132,10 @@ def get_instances_from_ganeti():
return snf_instances
# Only for testing this module individually
def main():
print get_instances_from_ganeti()
if __name__ == "__main__":
dictConfig(settings.RECONCILIATION_LOGGING)
sys.exit(main())
......@@ -40,28 +40,29 @@ LOGGING = {
'loggers': {
'synnefo': {
'handlers': ['console'],
'level': 'DEBUG'
'handlers': ['syslog'],
'level': 'INFO'
},
'synnefo.admin': {
'level': 'DEBUG',
'level': 'INFO',
'propagate': 1
},
'synnefo.api': {
'level': 'DEBUG',
'level': 'INFO',
'propagate': 1
},
'synnefo.db': {
'level': 'DEBUG',
'level': 'INFO',
'propagate': 1
},
'synnefo.logic': {
'level': 'DEBUG',
'level': 'INFO',
'propagate': 1
},
}
}
DISPATCHER_LOGGING = {
'version': 1,
'disable_existing_loggers': True,
......@@ -79,9 +80,9 @@ DISPATCHER_LOGGING = {
},
'file': {
'class': 'logging.handlers.WatchedFileHandler',
'filename': 'dispatcher.log',
'filename': '/var/log/synnefo/dispatcher.log',
'formatter': 'verbose',
'level': 'INFO'
'level': 'DEBUG'
},
},
......@@ -95,32 +96,6 @@ DISPATCHER_LOGGING = {
}
}
RECONCILIATION_LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '%(asctime)s [%(levelname)s] %(message)s'
},
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'verbose'
},
},
'loggers': {
'synnefo': {'propagate': 1}
},
'root': {
'handlers': ['console'],
'level': 'DEBUG',
}
}
SNFADMIN_LOGGING = {
'version': 1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment