本文整理了Java中ch.qos.logback.core.rolling.RollingFileAppender.setBufferSize
方法的一些代码示例,展示了RollingFileAppender.setBufferSize
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RollingFileAppender.setBufferSize
方法的具体详情如下:
包路径:ch.qos.logback.core.rolling.RollingFileAppender
类名称:RollingFileAppender
方法名:setBufferSize
暂无
代码示例来源:origin: jmxtrans/jmxtrans
protected Appender buildAppender(String loggerName, String fileStr) {
final RollingFileAppender appender = new RollingFileAppender();
appender.setName(loggerName + "RollingFile");
appender.setContext(loggerContext);
appender.setImmediateFlush(true);
appender.setBufferSize(new FileSize(LOG_IO_BUFFER_SIZE_BYTES));
appender.setFile(fileStr);
appender.setEncoder(buildEncoder());
TriggeringPolicy triggeringPolicy = buildTriggeringPolicy();
if (triggeringPolicy != null) {
appender.setTriggeringPolicy(triggeringPolicy);
}
appender.setRollingPolicy(buildRollingPolicy(appender, fileStr));
appender.start();
return appender;
}
代码示例来源:origin: dropwizard/dropwizard
appender.setContext(context);
appender.setFile(currentLogFilename);
appender.setBufferSize(new FileSize(bufferSize.toBytes()));
代码示例来源:origin: org.jmxtrans/jmxtrans-output-logback
protected Appender buildAppender(String loggerName, String fileStr) {
final RollingFileAppender appender = new RollingFileAppender();
appender.setName(loggerName + "RollingFile");
appender.setContext(loggerContext);
appender.setImmediateFlush(true);
appender.setBufferSize(new FileSize(LOG_IO_BUFFER_SIZE_BYTES));
appender.setFile(fileStr);
appender.setEncoder(buildEncoder());
TriggeringPolicy triggeringPolicy = buildTriggeringPolicy();
if (triggeringPolicy != null) {
appender.setTriggeringPolicy(triggeringPolicy);
}
appender.setRollingPolicy(buildRollingPolicy(appender, fileStr));
appender.start();
return appender;
}
代码示例来源:origin: io.dropwizard/dropwizard-logging
appender.setContext(context);
appender.setFile(currentLogFilename);
appender.setBufferSize(new FileSize(bufferSize.toBytes()));
代码示例来源:origin: airlift/airlift
public RollingFileHandler(String filename, int maxHistory, long maxSizeInBytes)
{
setFormatter(new StaticFormatter());
ContextBase context = new ContextBase();
recoverTempFiles(filename);
RollingFileAppender<String> fileAppender = new RollingFileAppender<>();
TimeBasedRollingPolicy<String> rollingPolicy = new TimeBasedRollingPolicy<>();
SizeAndTimeBasedFNATP<String> triggeringPolicy = new SizeAndTimeBasedFNATP<>();
rollingPolicy.setContext(context);
rollingPolicy.setFileNamePattern(filename + "-%d{yyyy-MM-dd}.%i.log.gz");
rollingPolicy.setMaxHistory(maxHistory);
rollingPolicy.setTimeBasedFileNamingAndTriggeringPolicy(triggeringPolicy);
rollingPolicy.setParent(fileAppender);
triggeringPolicy.setContext(context);
triggeringPolicy.setTimeBasedRollingPolicy(rollingPolicy);
triggeringPolicy.setMaxFileSize(new FileSize(maxSizeInBytes));
fileAppender.setContext(context);
fileAppender.setFile(filename);
fileAppender.setAppend(true);
fileAppender.setBufferSize(BUFFER_SIZE_IN_BYTES);
fileAppender.setEncoder(new StringEncoder());
fileAppender.setRollingPolicy(rollingPolicy);
asyncAppender = new AsyncAppenderBase<>();
asyncAppender.setContext(context);
asyncAppender.addAppender(fileAppender);
rollingPolicy.start();
triggeringPolicy.start();
fileAppender.start();
asyncAppender.start();
}
代码示例来源:origin: com.proofpoint.platform/log
if (queueSize > 0) {
fileAppender = new FlushingFileAppender<>(flushInterval);
fileAppender.setBufferSize(BUFFER_SIZE_IN_BYTES);
fileAppender.setImmediateFlush(false);
内容来源于网络,如有侵权,请联系作者删除!