這是本文件的舊版!
elasticsearch
透過ant將預設logging.yml設定改為rolling file
目標是要將
file: type: dailyRollingFile file: ${path.logs}/${cluster.name}.log datePattern: "'.'yyyy-MM-dd" layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.10000m%n"修改為
file: type: rollingFile file: ${path.logs}/${cluster.name}.log maxFileSize: 8000KB maxBackupIndex: 10 layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.10000m%n"ant內容如下:
<replaceregexp file="config/logging.yml" match="type: dailyRollingFile" replace="type: rollingFile${line.separator} maxFileSize: 8000KB${line.separator} maxBackupIndex: 10" flags="g"/> <replaceregexp file="config/logging.yml" match="[ \t]*datePattern: .*[\r\n]*" replace="" flags="g"/>
修改elasticsearch.yml打開search與index的debug
index.search.slowlog.threshold.query.debug: 0s index.search.slowlog.threshold.fetch.debug: 0s index.indexing.slowlog.threshold.index.debug: 0s