码迷,mamicode.com
首页 > 其他好文 > 详细

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

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

标签:elasticsearch logging.yml size

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存贮日志

标签:elasticsearch logging.yml size

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!