本文整理汇总了Java中ch.qos.logback.classic.PatternLayout.setOutputPatternAsHeader方法的典型用法代码示例。如果您正苦于以下问题:Java PatternLayout.setOutputPatternAsHeader方法的具体用法?Java PatternLayout.setOutputPatternAsHeader怎么用?Java PatternLayout.setOutputPatternAsHeader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.qos.logback.classic.PatternLayout
的用法示例。
在下文中一共展示了PatternLayout.setOutputPatternAsHeader方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
@Override
public void start()
{
if (isStarted()) {
return;
}
PatternLayout patternLayout = new PatternLayout();
patternLayout.setContext(context);
patternLayout.setPattern(PATTERN);
patternLayout.setOutputPatternAsHeader(false);
patternLayout.start();
this.layout = patternLayout;
super.start();
}
示例2: start
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
public void start() {
PatternLayout patternLayout = new PatternLayout();
patternLayout.setContext(this.context);
patternLayout.setPattern(this.getPattern());
patternLayout.setOutputPatternAsHeader(this.outputPatternAsHeader);
patternLayout.start();
super.start();
}
示例3: start
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
@Override
public void start() {
PatternLayout patternLayout = new CatPatternLayout();
patternLayout.setContext(this.context);
patternLayout.setPattern(getPattern());
patternLayout.setOutputPatternAsHeader(this.outputPatternAsHeader);
patternLayout.start();
this.layout = patternLayout;
this.started = true;
}
示例4: start
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
@Override
public void start() {
PatternLayout patternLayout = new PatternLayout();
patternLayout.setContext(context);
patternLayout.setPattern(getPattern());
patternLayout.setOutputPatternAsHeader(outputPatternAsHeader);
patternLayout.start();
this.layout = patternLayout;
super.start();
}
示例5: buildPatternLayout
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
private Layout<ILoggingEvent> buildPatternLayout(String pattern) {
PatternLayout layout = new PatternLayout();
layout.setContext(loggerContext);
layout.setFileHeader(HEADER);
layout.setOutputPatternAsHeader(false);
layout.setPattern(pattern);
layout.setFileFooter(FOOTER);
layout.start();
return layout;
}
示例6: setPattern
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
public void setPattern(String pattern) {
layout = new PatternLayout();
layout.setPattern(pattern);
layout.setContext(context);
layout.setOutputPatternAsHeader(true);
layout.start();
}
开发者ID:pbauerochse,项目名称:youtrack-worklog-viewer,代码行数:8,代码来源:ListenableLimitedLogMessagesAppender.java
示例7: start
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
@Override
public void start() {
PatternLayout patternLayout = new PatternLayout();
patternLayout.getDefaultConverterMap().put("id", CorrelationConverter.class.getName());
patternLayout.getDefaultConverterMap().put("correlationId", CorrelationConverter.class.getName());
patternLayout.setContext(context);
patternLayout.setPattern(getPattern());
patternLayout.setOutputPatternAsHeader(outputPatternAsHeader);
patternLayout.start();
this.layout = patternLayout;
this.started = true;
System.out.println("custom encoder started");
}
示例8: start
import ch.qos.logback.classic.PatternLayout; //导入方法依赖的package包/类
@Override
public void start() {
PatternLayout patternLayout = new KeyValuePatternLayout();
patternLayout.setContext(this.context);
patternLayout.setPattern(getPattern());
patternLayout.setOutputPatternAsHeader(this.outputPatternAsHeader);
patternLayout.start();
this.layout = patternLayout;
super.start();
}