當前位置: 首頁>>代碼示例>>Java>>正文


Java PatternLayout.setOutputPatternAsHeader方法代碼示例

本文整理匯總了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();
}
 
開發者ID:treasure-data,項目名稱:digdag,代碼行數:17,代碼來源:LogbackTaskContextLoggerBridgeAppender.java

示例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();
}
 
開發者ID:geeker-lait,項目名稱:tasfe-framework,代碼行數:9,代碼來源:TasfeFilePatternLayout.java

示例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;
}
 
開發者ID:manuito,項目名稱:cat-layout,代碼行數:11,代碼來源:CatPatternLayoutEncoder.java

示例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();
}
 
開發者ID:cscfa,項目名稱:bartleby,代碼行數:11,代碼來源:PatternLayoutEncoder.java

示例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;
}
 
開發者ID:cscfa,項目名稱:bartleby,代碼行數:11,代碼來源:SMTPAppender_GreenTest.java

示例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");
}
 
開發者ID:Derek-Ashmore,項目名稱:RequestCorrelation,代碼行數:16,代碼來源:CorrelationPatternLayoutEncoder.java

示例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();
}
 
開發者ID:geub,項目名稱:kv-mdc-logback,代碼行數:11,代碼來源:KeyValuePatternLayoutEncoder.java


注:本文中的ch.qos.logback.classic.PatternLayout.setOutputPatternAsHeader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。