這是本文件的舊版!
elasticsearch
Ant中將logging設定改為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: 20KB 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"/>