Revision 9e98ba3c README.admin

b/README.admin
43 43
=======
44 44

  
45 45
Logging in Synnefo is using Python's logging module. The module is configured
46
using a configuration file, whose format is described here:
47

  
48
http://docs.python.org/library/logging.config.html
49

  
50
By default, the log initialization code will look for the logging.conf file
51
in the following locations in order:
52

  
53
1. /etc/synnefo/logging.conf
54
2. os.getcwd()/logging.conf
55
3. synnefo.logic.__path__[0]/logging.conf (<-- this is the default)
56

  
57
The default configuration is using Linux conventions: it logs to /dev/log for
58
all loggers. The default configuration can be changed by copying the default
59
file to any of the above mentioned locations and changing it appropriately.
60

  
61
* Logging and demonization: If the logging is configured to print to the console
62
  (using the consoleHandler handler) then daemon processes (notably, the
63
  dispatcher) will not work as it should. This only happens after the daemon
64
  has lost its controlling terminal (e.g. because the terminal was closed);
65
  in this case the dispatcher does not know where to log to and depending on
66
  the system it either crashes or stalls. This can be avoided if the logging
67
  module is not configured to output to the console.
46
using dictionary configuration, whose format is described here:
47

  
48
http://docs.python.org/release/2.7.1/library/logging.html#logging-config-dictschema
49

  
50
Note that this is a feature of Python 2.7 that we have backported for use in
51
Python 2.6.
52

  
53
The logging configuration dictionary is defined in settings.d/00-logging.conf
54
and is broken in 4 separate dictionaries:
55

  
56
  * LOGGING is the logging configuration used by the web app. By default all
57
    loggers fall back to the main 'synnefo' logger. The subloggers can be
58
    changed accordingly for finer logging control. e.g. To disable debug
59
    messages from the API set the level of 'synnefo.api' to 'INFO'.
60
  
61
  * DISPATCHER_LOGGING is the logging configuration of the logic/dispatcher.py
62
    command line tool.
63
  
64
  * RECONCILIATION_LOGGING is the logging configuration of the
65
    logic/reconciliation.py command line tool.
66
  
67
  * SNFADMIN_LOGGING is the logging configuration of the snf-admin tool.
68
    Consider using matching configuration for snf-admin and the synnefo.admin
69
    logger of the web app.
68 70

  
69 71

  
70 72
Admin Tools

Also available in: Unified diff