首页 > 其他 > 详细

elasticsearch 2.4 修改logging.yml设置成按size存贮日志

时间:2016-11-25 14:33:25      阅读:1510      评论:0      收藏:0      [点我收藏+]

elasticsearch 2.4 日志为logging.yml 设置成size存储 由于elasticsearch 5.XX使用log4j2.property 教程很多,很方便设置成按size存储



es.logger.level: INFO
#rootLogger: ${es.logger.level}, console, file
rootLogger: ${es.logger.level}, file  #只输出到文件不输出到控制台
#开启debug日志追踪
#logger:
#  action: DEBUG
#  deprecation: INFO, deprecation_log_file
 # index.search.slowlog: TRACE, index_search_slow_log_file
 # index.indexing.slowlog: TRACE, index_indexing_slow_log_file
#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"
  file:
    type: rollingFile
    file: ${path.logs}/${cluster.name}.log
    maxFileSize: 10000000   #10M时滚动一次
    maxBackupIndex: 5
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.10000m%n"
  #deprecation_log_file:
  #  type: rollingFile
  #  file: ${path.logs}/${cluster.name}_deprecation.log
  #  maxFileSize: 10000000
  #  maxBackupIndex: 5
  #  layout:
  #    type: pattern
  #    conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
  #index_search_slow_log_file:
  #  type: rollingFile
  #  file: ${path.logs}/${cluster.name}_index_search_slowlog.log
  #  maxFileSize: 10000000
  #  maxBackupIndex: 5
   # layout:
  #    type: pattern
  #    conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
  #index_indexing_slow_log_file:
  #  type: rollingFile
  #  file: ${path.logs}/${cluster.name}_index_indexing_slowlog.log
  #  maxFileSize: 10000000
  #  maxBackupIndex: 5
  #  layout:
  #    type: pattern
  #    conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"



本文出自 “10409019” 博客,请务必保留此出处http://10419019.blog.51cto.com/10409019/1876488

elasticsearch 2.4 修改logging.yml设置成按size存贮日志

原文:http://10419019.blog.51cto.com/10409019/1876488

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!