Skip to content

Commit

Permalink
Merge pull request #4773 from jcantrill/fix_console_logging
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Aug 17, 2017
2 parents cf1aa0e + 88e07e2 commit eedee44
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
7 changes: 7 additions & 0 deletions roles/openshift_logging_elasticsearch/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@
- openshift_logging_elasticsearch_kibana_index_mode in __kibana_index_modes
msg: "The openshift_logging_elasticsearch_kibana_index_mode '{{ openshift_logging_elasticsearch_kibana_index_mode }}' only supports one of: {{ __kibana_index_modes | join(', ') }}"

- assert:
that:
- "{{ openshift_logging_es_log_appenders | length > 0 }}"
msg: "The openshift_logging_es_log_appenders '{{ openshift_logging_es_log_appenders }}' has an unrecognized option and only supports the following as a list: {{ __es_log_appenders | join(', ') }}"

- template:
src: elasticsearch-logging.yml.j2
dest: "{{ tempdir }}/elasticsearch-logging.yml"
vars:
root_logger: "{{openshift_logging_es_log_appenders | join(', ')}}"
when: es_logging_contents is undefined
changed_when: no

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
rootLogger: ${es.logger.level}, {{root_logger}}
logger:
# log action execution errors for easier debugging
action: WARN

#
# deprecation logging, turn to DEBUG to see them
deprecation: WARN, deprecation_log_file

# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN

io.fabric8.elasticsearch: ${PLUGIN_LOGLEVEL}
io.fabric8.kubernetes: ${PLUGIN_LOGLEVEL}

# aws will try to do some sketchy JMX stuff, but its not needed.
com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR
com.amazonaws.metrics.AwsSdkMetrics: ERROR

org.apache.http: INFO

# gateway
#gateway: DEBUG
#index.gateway: DEBUG
Expand All @@ -28,13 +40,14 @@ logger:
additivity:
index.search.slowlog: false
index.indexing.slowlog: false
deprecation: false

appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.1000m%n"
# need this filter until https://github.com/openshift/origin/issues/14515 is fixed
filter:
1:
Expand Down Expand Up @@ -67,6 +80,14 @@ appender:
#type: pattern
#conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

deprecation_log_file:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}_deprecation.log
datePattern: "'.'yyyy-MM-dd"
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

index_search_slow_log_file:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}_index_search_slowlog.log
Expand Down
2 changes: 1 addition & 1 deletion roles/openshift_logging_elasticsearch/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__latest_es_version: "3_5"
__allowed_es_versions: ["3_5", "3_6"]
__allowed_es_types: ["data-master", "data-client", "master", "client"]

__es_log_appenders: ['file', 'console']
__kibana_index_modes: ["unique", "shared_ops"]

# TODO: integrate these
Expand Down

0 comments on commit eedee44

Please sign in to comment.