当前位置: 首页>>代码示例>>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;未经允许,请勿转载。