elasticsearch 2.4 修改logging.yml设置成按size存贮日志
elasticsearch 2.4 日志为logging.yml 设置成size存储 由于elasticsearch 5.XX使用log4j2.property 教程很多,很方便设置成按size存储1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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"
页:
[1]