本文整理匯總了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();
}