Skip to content

Instantly share code, notes, and snippets.

@khoatle

khoatle/log4j2.properties Secret

Created May 16, 2020
Embed
What would you like to do?
status = error
# log action execution errors for easier debugging
logger.action.name = org.elasticsearch.action
logger.action.level = debug
appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
# See the link below for details about ES log configuration
# https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html
# Default Elasticsearch logging file
appender.file.type = File
appender.file.name = file
appender.file.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
rootLogger.appenderRef.file.ref = file
# Elasticsearch deprecation logging
appender.deprecation.type = File
appender.deprecation.name = deprecation
appender.deprecation.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.log
appender.deprecation.layout.type = PatternLayout
appender.deprecation.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
logger.deprecation.name = org.elasticsearch.deprecation
logger.deprecation.level = warn
logger.deprecation.appenderRef.deprecation.ref = deprecation
logger.deprecation.additivity = false
# Elasticsearch search slowlog
appender.index_search_slowlog.type = File
appender.index_search_slowlog.name = index_search_slowlog
appender.index_search_slowlog.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog.log
appender.index_search_slowlog.layout.type = PatternLayout
appender.index_search_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
logger.index_search_slowlog.name = index.search.slowlog
logger.index_search_slowlog.level = trace
logger.index_search_slowlog.appenderRef.index_search_slowlog.ref = index_search_slowlog
logger.index_search_slowlog.additivity = false
# Elasticsearch indexing slowlog
appender.index_indexing_slowlog.type = File
appender.index_indexing_slowlog.name = index_indexing_slowlog
appender.index_indexing_slowlog.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog.log
appender.index_indexing_slowlog.layout.type = PatternLayout
appender.index_indexing_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
logger.index_indexing_slowlog.name = index.indexing.slowlog.index
logger.index_indexing_slowlog.level = trace
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog.ref = index_indexing_slowlog
logger.index_indexing_slowlog.additivity = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment