|
|
@ -136,13 +136,13 @@ class DefaultLogbackConfiguration {
|
|
|
|
appender.setEncoder(encoder);
|
|
|
|
appender.setEncoder(encoder);
|
|
|
|
config.start(encoder);
|
|
|
|
config.start(encoder);
|
|
|
|
appender.setFile(logFile);
|
|
|
|
appender.setFile(logFile);
|
|
|
|
getRollingPolicy(appender, config, logFile);
|
|
|
|
setRollingPolicy(appender, config, logFile);
|
|
|
|
getMaxFileSize(appender, config);
|
|
|
|
setMaxFileSize(appender, config);
|
|
|
|
config.appender("FILE", appender);
|
|
|
|
config.appender("FILE", appender);
|
|
|
|
return appender;
|
|
|
|
return appender;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void getRollingPolicy(RollingFileAppender<ILoggingEvent> appender,
|
|
|
|
private void setRollingPolicy(RollingFileAppender<ILoggingEvent> appender,
|
|
|
|
LogbackConfigurator config, String logFile) {
|
|
|
|
LogbackConfigurator config, String logFile) {
|
|
|
|
FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
|
|
|
|
FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
|
|
|
|
rollingPolicy.setFileNamePattern(logFile + ".%i");
|
|
|
|
rollingPolicy.setFileNamePattern(logFile + ".%i");
|
|
|
@ -151,7 +151,7 @@ class DefaultLogbackConfiguration {
|
|
|
|
config.start(rollingPolicy);
|
|
|
|
config.start(rollingPolicy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void getMaxFileSize(RollingFileAppender<ILoggingEvent> appender,
|
|
|
|
private void setMaxFileSize(RollingFileAppender<ILoggingEvent> appender,
|
|
|
|
LogbackConfigurator config) {
|
|
|
|
LogbackConfigurator config) {
|
|
|
|
SizeBasedTriggeringPolicy<ILoggingEvent> triggeringPolicy = new SizeBasedTriggeringPolicy<ILoggingEvent>();
|
|
|
|
SizeBasedTriggeringPolicy<ILoggingEvent> triggeringPolicy = new SizeBasedTriggeringPolicy<ILoggingEvent>();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|