Atom feed of this document
 

 Configuring Logging

You can use nova.conf configuration options to indicate where Compute will log events, the level of logging, and customize log formats.

To customize log formats for OpenStack Compute, use these configuration option settings.

Table 4.1. Description of nova.conf log file configuration options
Configuration option=Default value (Type) Description
default_log_levels="amqplib=WARN,sqlalchemy=WARN,boto=WARN,suds=INFO,eventlet.wsgi.server=WARN" (ListOpt) list of logger=LEVEL pairs
instance_format=[instance: %(uuid)s] (StrOpt) If an instance is passed with the log message, format it like this
instance_uuid_format=[instance: %(uuid)s] (StrOpt) If an instance UUID is passed with the log message, format it like this

log_config=<None>

(StrOpt) If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.

log_date_format=%Y-%m-%d %H:%M:%S

(StrOpt) Format string for %(asctime)s in log records. Default: %default

log_dir=<None>

(StrOpt) (Optional) The directory to keep log files in (will be prepended to --logfile)

log_file=<None>

(StrOpt) (Optional) Name of log file to output to. If not set, logging will go to stdout.

log_format="%(asctime)s %(levelname)8s [%(name)s] %(message)s"

(StrOpt) A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes. Default: %default

logdir=<None>

(StrOpt) Log output to a per-service log file in named directory

logfile=<None>

(StrOpt) Log output to a named file

logfile_mode=0644

(StrOpt) Default file mode used when creating log files

logging_context_format_string="%(asctime)s %(levelname)s %(name)s [%(request_id)s %(user_id)s %(project_id)s] %(instance)s%(message)s" (StrOpt) format string to use for log messages with context
logging_debug_format_suffix="from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d" (StrOpt) data to append to log format when level is DEBUG
logging_default_format_string="%(asctime)s %(levelname)s %(name)s [-] %(instance)s%(message)s" (StrOpt) format string to use for log messages without context
logging_exception_prefix="%(asctime)s TRACE %(name)s %(instance)s" (StrOpt) prefix each line of exception output with this format
publish_errors=false (BoolOpt) publish error events
publish_errors=false (BoolOpt) publish error events
use_syslog=false (BoolOpt) Use syslog for logging
syslog_log_facility=LOG_USER (StrOpt) syslog facility to receive log lines


loading table of contents...