log4j2.properties 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. status = error
  2. name = LogstashPropertiesConfig
  3. appender.console.type = Console
  4. appender.console.name = plain_console
  5. appender.console.layout.type = PatternLayout
  6. appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
  7. appender.json_console.type = Console
  8. appender.json_console.name = json_console
  9. appender.json_console.layout.type = JSONLayout
  10. appender.json_console.layout.compact = true
  11. appender.json_console.layout.eventEol = true
  12. appender.rolling.type = RollingFile
  13. appender.rolling.name = plain_rolling
  14. appender.rolling.fileName = ${sys:ls.logs}/logstash-${sys:ls.log.format}.log
  15. appender.rolling.filePattern = ${sys:ls.logs}/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
  16. appender.rolling.policies.type = Policies
  17. appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
  18. appender.rolling.policies.time.interval = 1
  19. appender.rolling.policies.time.modulate = true
  20. appender.rolling.layout.type = PatternLayout
  21. appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %-.10000m%n
  22. appender.json_rolling.type = RollingFile
  23. appender.json_rolling.name = json_rolling
  24. appender.json_rolling.fileName = ${sys:ls.logs}/logstash-${sys:ls.log.format}.log
  25. appender.json_rolling.filePattern = ${sys:ls.logs}/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
  26. appender.json_rolling.policies.type = Policies
  27. appender.json_rolling.policies.time.type = TimeBasedTriggeringPolicy
  28. appender.json_rolling.policies.time.interval = 1
  29. appender.json_rolling.policies.time.modulate = true
  30. appender.json_rolling.layout.type = JSONLayout
  31. appender.json_rolling.layout.compact = true
  32. appender.json_rolling.layout.eventEol = true
  33. rootLogger.level = ${sys:ls.log.level}
  34. rootLogger.appenderRef.console.ref = ${sys:ls.log.format}_console
  35. rootLogger.appenderRef.rolling.ref = ${sys:ls.log.format}_rolling
  36. # Slowlog
  37. appender.console_slowlog.type = Console
  38. appender.console_slowlog.name = plain_console_slowlog
  39. appender.console_slowlog.layout.type = PatternLayout
  40. appender.console_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
  41. appender.json_console_slowlog.type = Console
  42. appender.json_console_slowlog.name = json_console_slowlog
  43. appender.json_console_slowlog.layout.type = JSONLayout
  44. appender.json_console_slowlog.layout.compact = true
  45. appender.json_console_slowlog.layout.eventEol = true
  46. appender.rolling_slowlog.type = RollingFile
  47. appender.rolling_slowlog.name = plain_rolling_slowlog
  48. appender.rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}.log
  49. appender.rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
  50. appender.rolling_slowlog.policies.type = Policies
  51. appender.rolling_slowlog.policies.time.type = TimeBasedTriggeringPolicy
  52. appender.rolling_slowlog.policies.time.interval = 1
  53. appender.rolling_slowlog.policies.time.modulate = true
  54. appender.rolling_slowlog.layout.type = PatternLayout
  55. appender.rolling_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %.10000m%n
  56. appender.json_rolling_slowlog.type = RollingFile
  57. appender.json_rolling_slowlog.name = json_rolling_slowlog
  58. appender.json_rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}.log
  59. appender.json_rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
  60. appender.json_rolling_slowlog.policies.type = Policies
  61. appender.json_rolling_slowlog.policies.time.type = TimeBasedTriggeringPolicy
  62. appender.json_rolling_slowlog.policies.time.interval = 1
  63. appender.json_rolling_slowlog.policies.time.modulate = true
  64. appender.json_rolling_slowlog.layout.type = JSONLayout
  65. appender.json_rolling_slowlog.layout.compact = true
  66. appender.json_rolling_slowlog.layout.eventEol = true
  67. logger.slowlog.name = slowlog
  68. logger.slowlog.level = trace
  69. logger.slowlog.appenderRef.console_slowlog.ref = ${sys:ls.log.format}_console_slowlog
  70. logger.slowlog.appenderRef.rolling_slowlog.ref = ${sys:ls.log.format}_rolling_slowlog
  71. logger.slowlog.additivity = false