oslo.log/doc/source/admin/example_nova.rst

2.7 KiB

Example Configuration File for nova

This sample configuration file demonstrates how the OpenStack compute service (nova) might be configured.

nova_sample.conf

Two logger nodes are set up, root and nova.

nova_sample.conf

Several handlers are created, to send messages to different outputs.

nova_sample.conf

And two formatters are created to be used based on whether the logging location will have OpenStack request context information available or not. A Fluentd formatter is also shown.

nova_sample.conf

The root logger is configured to send messages to the null handler, silencing most messages that are not part of the nova application code namespace.

nova_sample.conf

The nova logger is configured to send messages marked as INFO and higher level to the standard error stream.

nova_sample.conf

The amqp and amqplib loggers, used by the module that connects the application to the message bus, are configured to emit warning messages to the standard error stream.

nova_sample.conf

The sqlalchemy logger, used by the module that connects the application to the database, is configured to emit warning messages to the standard error stream.

nova_sample.conf

Similarly, boto, suds, and eventlet.wsgi.server are configured to send warnings to the standard error stream.

nova_sample.conf

The stderr handler, being used by most of the loggers above, is configured to write to the standard error stream on the console.

nova_sample.conf

The stderr handler uses the context formatter, which takes its configuration settings from oslo.config.

nova_sample.conf

The stdout and syslog handlers are defined, but not used.

The fluent handler is useful to send logs to fluentd. It is a part of fluent-logger-python and you can install it as following.

$ pip install fluent-logger

This handler is configured to use fluent formatter.

nova_sample.conf

nova_sample.conf