3 # nova extended logging configuration
7 # [*logging_context_format_string*]
8 # (optional) Format string to use for log messages with context.
10 # Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
11 # [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
13 # [*logging_default_format_string*]
14 # (optional) Format string to use for log messages without context.
16 # Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
17 # [-] %(instance)s%(message)s'
19 # [*logging_debug_format_suffix*]
20 # (optional) Formatted data to append to log format when level is DEBUG.
22 # Example: '%(funcName)s %(pathname)s:%(lineno)d'
24 # [*logging_exception_prefix*]
25 # (optional) Prefix each line of exception output with this format.
27 # Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
29 # [*log_config_append*]
30 # The name of an additional logging configuration file.
32 # See https://docs.python.org/2/howto/logging.html
34 # [*default_log_levels*]
35 # (optional) Hash of logger (keys) and level (values) pairs.
38 # { 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN',
39 # 'qpid' => 'WARN', 'sqlalchemy' => 'WARN', 'suds' => 'INFO',
40 # 'iso8601' => 'WARN',
41 # 'requests.packages.urllib3.connectionpool' => 'WARN' }
44 # (optional) Publish error events (boolean value).
45 # Defaults to undef (false if unconfigured).
47 # [*fatal_deprecations*]
48 # (optional) Make deprecations fatal (boolean value)
49 # Defaults to undef (false if unconfigured).
52 # (optional) If an instance is passed with the log message, format it
53 # like this (string value).
55 # Example: '[instance: %(uuid)s] '
57 # [*instance_uuid_format*]
58 # (optional) If an instance UUID is passed with the log message, format
59 # it like this (string value).
61 # Example: instance_uuid_format='[instance: %(uuid)s] '
64 # (optional) Format string for %%(asctime)s in log records.
66 # Example: 'Y-%m-%d %H:%M:%S'
69 $logging_context_format_string = undef,
70 $logging_default_format_string = undef,
71 $logging_debug_format_suffix = undef,
72 $logging_exception_prefix = undef,
73 $log_config_append = undef,
74 $default_log_levels = undef,
75 $publish_errors = undef,
76 $fatal_deprecations = undef,
77 $instance_format = undef,
78 $instance_uuid_format = undef,
79 $log_date_format = undef,
82 if $logging_context_format_string {
84 'DEFAULT/logging_context_format_string' :
85 value => $logging_context_format_string;
90 'DEFAULT/logging_context_format_string' : ensure => absent;
94 if $logging_default_format_string {
96 'DEFAULT/logging_default_format_string' :
97 value => $logging_default_format_string;
102 'DEFAULT/logging_default_format_string' : ensure => absent;
106 if $logging_debug_format_suffix {
108 'DEFAULT/logging_debug_format_suffix' :
109 value => $logging_debug_format_suffix;
114 'DEFAULT/logging_debug_format_suffix' : ensure => absent;
118 if $logging_exception_prefix {
120 'DEFAULT/logging_exception_prefix' : value => $logging_exception_prefix;
125 'DEFAULT/logging_exception_prefix' : ensure => absent;
129 if $log_config_append {
131 'DEFAULT/log_config_append' : value => $log_config_append;
136 'DEFAULT/log_config_append' : ensure => absent;
140 if $default_log_levels {
142 'DEFAULT/default_log_levels' :
143 value => join(sort(join_keys_to_values($default_log_levels, '=')), ',');
148 'DEFAULT/default_log_levels' : ensure => absent;
154 'DEFAULT/publish_errors' : value => $publish_errors;
159 'DEFAULT/publish_errors' : ensure => absent;
163 if $fatal_deprecations {
165 'DEFAULT/fatal_deprecations' : value => $fatal_deprecations;
170 'DEFAULT/fatal_deprecations' : ensure => absent;
174 if $instance_format {
176 'DEFAULT/instance_format' : value => $instance_format;
181 'DEFAULT/instance_format' : ensure => absent;
185 if $instance_uuid_format {
187 'DEFAULT/instance_uuid_format' : value => $instance_uuid_format;
192 'DEFAULT/instance_uuid_format' : ensure => absent;
196 if $log_date_format {
198 'DEFAULT/log_date_format' : value => $log_date_format;
203 'DEFAULT/log_date_format' : ensure => absent;