| {%- set log_handlers = [] -%} |
| {%- for log_handler_name, log_handler_attrs in values.logging.log_handlers.items() %} |
| {%- if log_handler_attrs.get('enabled', False) %} |
| {%- do log_handlers.append(log_handler_name) -%} |
| {%- endif %} |
| {%- endfor %} |
| [loggers] |
| keys = root, heat, eventletwsgi |
| |
| [handlers] |
| keys = {{ log_handlers | join(", ") }} |
| |
| [formatters] |
| keys = context, default{% if values.logging.log_handlers.get('fluentd', {}).get('enabled', False) %}, fluentd{% endif %} |
| |
| [logger_root] |
| level = WARNING |
| handlers = {{ log_handlers | join(", ") }} |
| |
| [logger_heat] |
| level = INFO |
| handlers = {{ log_handlers | join(", ") }} |
| qualname = heat |
| propagate = 0 |
| |
| [logger_amqplib] |
| level = WARNING |
| handlers = {{ log_handlers | join(", ") }} |
| qualname = amqplib |
| |
| [logger_sqlalchemy] |
| level = WARNING |
| handlers = {{ log_handlers | join(", ") }} |
| qualname = sqlalchemy |
| # "level = INFO" logs SQL queries. |
| # "level = DEBUG" logs SQL queries and results. |
| # "level = WARNING" logs neither. (Recommended for production systems.) |
| |
| [logger_boto] |
| level = WARNING |
| handlers = {{ log_handlers | join(", ") }} |
| qualname = boto |
| |
| [logger_suds] |
| level = INFO |
| handlers = {{ log_handlers | join(", ") }} |
| qualname = suds |
| |
| [logger_eventletwsgi] |
| level = INFO |
| handlers = {{ log_handlers | join(", ") }} |
| qualname = eventlet.wsgi.server |
| |
| {%- if values.logging.log_handlers.get('fluentd', {}).get('enabled', False) %} |
| [handler_fluentd] |
| class = fluent.handler.FluentHandler |
| args = ('openstack.{{ service_name | replace("-", ".", 1) }}', 'localhost', 24224) |
| formatter = fluentd |
| {%- endif %} |
| |
| {%- if values.logging.log_handlers.watchedfile.enabled %} |
| [handler_watchedfile] |
| class = handlers.WatchedFileHandler |
| args = ('/var/log/heat/{{ service_name }}.log',) |
| formatter = context |
| {%- endif %} |
| |
| {% if values.logging.log_handlers.get('ossyslog', {}).get('enabled', False) -%} |
| {%- set ossyslog_args = values.logging.log_handlers.ossyslog.get('args', {}) -%} |
| [handler_ossyslog] |
| class = oslo_log.handlers.OSSysLogHandler |
| args = ( handlers.SysLogHandler.{{ ossyslog_args.get('facility', 'LOG_USER') }}, ) |
| formatter = context |
| {%- endif %} |
| |
| [formatter_context] |
| class = oslo_log.formatters.ContextFormatter |
| |
| [formatter_default] |
| format = %(message)s |
| |
| {%- if values.logging.log_handlers.get('fluentd', {}).get('enabled', False) %} |
| [formatter_fluentd] |
| class = oslo_log.formatters.FluentFormatter |
| {%- endif %} |