log4j2.properties.j2 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. status = error
  2. # log action execution errors for easier debugging
  3. logger.action.name = org.elasticsearch.action
  4. logger.action.level = debug
  5. appender.console.type = Console
  6. appender.console.name = console
  7. appender.console.layout.type = PatternLayout
  8. appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
  9. appender.rolling.type = RollingFile
  10. appender.rolling.name = rolling
  11. appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
  12. appender.rolling.layout.type = PatternLayout
  13. appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
  14. appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}.log
  15. appender.rolling.policies.type = Policies
  16. appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
  17. appender.rolling.policies.time.interval = 1
  18. appender.rolling.policies.time.modulate = true
  19. rootLogger.level = info
  20. {% if 'console' in root_logger %}
  21. rootLogger.appenderRef.console.ref = console
  22. {% endif %}
  23. {% if 'file' in root_logger %}
  24. rootLogger.appenderRef.rolling.ref = rolling
  25. {% endif %}
  26. appender.deprecation_rolling.type = RollingFile
  27. appender.deprecation_rolling.name = deprecation_rolling
  28. appender.deprecation_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.log
  29. appender.deprecation_rolling.layout.type = PatternLayout
  30. appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
  31. appender.deprecation_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation-%i.log.gz
  32. appender.deprecation_rolling.policies.type = Policies
  33. appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
  34. appender.deprecation_rolling.policies.size.size = 1GB
  35. appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
  36. appender.deprecation_rolling.strategy.max = 4
  37. logger.deprecation.name = org.elasticsearch.deprecation
  38. logger.deprecation.level = warn
  39. logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
  40. logger.deprecation.additivity = false
  41. appender.index_search_slowlog_rolling.type = RollingFile
  42. appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
  43. appender.index_search_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog.log
  44. appender.index_search_slowlog_rolling.layout.type = PatternLayout
  45. appender.index_search_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
  46. appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog-%d{yyyy-MM-dd}.log
  47. appender.index_search_slowlog_rolling.policies.type = Policies
  48. appender.index_search_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
  49. appender.index_search_slowlog_rolling.policies.time.interval = 1
  50. appender.index_search_slowlog_rolling.policies.time.modulate = true
  51. logger.index_search_slowlog_rolling.name = index.search.slowlog
  52. logger.index_search_slowlog_rolling.level = trace
  53. logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
  54. logger.index_search_slowlog_rolling.additivity = false
  55. appender.index_indexing_slowlog_rolling.type = RollingFile
  56. appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
  57. appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog.log
  58. appender.index_indexing_slowlog_rolling.layout.type = PatternLayout
  59. appender.index_indexing_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
  60. appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
  61. appender.index_indexing_slowlog_rolling.policies.type = Policies
  62. appender.index_indexing_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
  63. appender.index_indexing_slowlog_rolling.policies.time.interval = 1
  64. appender.index_indexing_slowlog_rolling.policies.time.modulate = true
  65. logger.index_indexing_slowlog.name = index.indexing.slowlog.index
  66. logger.index_indexing_slowlog.level = trace
  67. logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
  68. logger.index_indexing_slowlog.additivity = false