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"
时间: 2024-10-08 20:55:21