use of ch.qos.logback.classic.PatternLayout in project molgenis by molgenis.
the class JobExecutionLogAppender method createLayout.
private void createLayout() {
layout = new PatternLayout();
layout.setPattern("%d{HH:mm:ss.SSS} - %msg%n%nopex");
layout.setContext(getContext());
layout.start();
}
use of ch.qos.logback.classic.PatternLayout in project coffeenet-starter by coffeenet.
the class CoffeeNetLoggingAutoConfiguration method gelfAppender.
private GelfAppender gelfAppender(LoggerContext loggerContext) {
GelfAppender gelfAppender = new GelfAppender();
gelfAppender.setContext(loggerContext);
gelfAppender.setName(COFFEENET_GELF);
gelfAppender.setServer(coffeeNetLoggingGelfProperties.getServer());
gelfAppender.setProtocol(coffeeNetLoggingGelfProperties.getProtocol());
gelfAppender.setPort(coffeeNetLoggingGelfProperties.getPort());
gelfAppender.addAdditionalField("application", coffeeNetConfigurationProperties.getApplicationName());
gelfAppender.addAdditionalField("environment", coffeeNetLoggingGelfProperties.getEnvironment());
PatternLayout patternLayout = new PatternLayout();
patternLayout.setContext(loggerContext);
patternLayout.setPattern(coffeeNetLoggingGelfProperties.getLayout());
patternLayout.start();
gelfAppender.setLayout(patternLayout);
gelfAppender.start();
return gelfAppender;
}
use of ch.qos.logback.classic.PatternLayout in project sonarqube by SonarSource.
the class PatternLayoutEncoder method start.
@Override
public void start() {
PatternLayout patternLayout = new PatternLayout();
patternLayout.getDefaultConverterMap().putAll(getEscapedMessageConverterConfig());
patternLayout.setContext(context);
patternLayout.setPattern(getPattern());
patternLayout.setOutputPatternAsHeader(outputPatternAsHeader);
patternLayout.start();
this.layout = patternLayout;
super.start();
}
Aggregations