ch.qos.logback.core.Layout Java Examples
The following examples show how to use
ch.qos.logback.core.Layout.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LogBackHookProxy.java From uavstack with Apache License 2.0 | 5 votes |
private void getAppenderInfo(FileAppender<ILoggingEvent> fileAppender, LinkedList<LogProfileInfo> list, String appid) { LogProfileInfo logProfileInfo = new LogProfileInfo(); logProfileInfo.setLogType(LogProfileInfo.LogType.Log4j); logProfileInfo.setFilePath(fileAppender.getFile()); if (appid != null) { logProfileInfo.setAppId(appid); } Map<String, String> attributes = new HashMap<String, String>(); attributes.put(LogProfileInfo.ENGINE, "logback"); @SuppressWarnings("rawtypes") LayoutWrappingEncoder encoder = (LayoutWrappingEncoder) fileAppender.getEncoder(); Layout<?> layout = encoder.getLayout(); if (null != layout) { if (layout instanceof PatternLayout) { PatternLayout patternLayout = (PatternLayout) encoder.getLayout(); attributes.put(LogProfileInfo.PATTERN, patternLayout.getPattern()); } else if (layout instanceof HTMLLayout) { attributes.put(LogProfileInfo.PATTERN, "HTMLLayout"); } else if (layout instanceof XMLLayout) { attributes.put(LogProfileInfo.PATTERN, "XMLLayout"); } else if (layout instanceof TTLLLayout) { attributes.put(LogProfileInfo.PATTERN, "TTCCLayout"); } } logProfileInfo.setAttributes(attributes); list.add(logProfileInfo); }
Example #2
Source File: LogMessageBroadcaster.java From pdfsam with GNU Affero General Public License v3.0 | 5 votes |
@Override public void append(ILoggingEvent event) { if (!isStarted()) { return; } Layout<ILoggingEvent> layout = encoder.getLayout(); if (nonNull(layout)) { doAppendMessage(encoder.getLayout().doLayout(event), event); } }
Example #3
Source File: MillisecondPrecisionSyslogAppender.java From logging-java with Apache License 2.0 | 5 votes |
@Override public Layout<ILoggingEvent> buildLayout() { final PatternLayout layout = new PatternLayout(); layout.getInstanceConverterMap().put("syslogStart", MillisecondPrecisionSyslogStartConverter.class.getName()); if (suffixPattern == null) { suffixPattern = DEFAULT_SUFFIX_PATTERN; } layout.setPattern(getPrefixPattern() + suffixPattern); layout.setContext(getContext()); layout.start(); return layout; }
Example #4
Source File: Syslog4jAppender.java From logback-syslog4j with MIT License | 4 votes |
public Layout<E> getLayout() { return layout; }
Example #5
Source File: KafkaLayoutEncoder.java From SkyEye with GNU General Public License v3.0 | 4 votes |
public Layout<E> getLayout() { return layout; }
Example #6
Source File: KafkaLayoutEncoder.java From SkyEye with GNU General Public License v3.0 | 4 votes |
public void setLayout(Layout<E> layout) { this.layout = layout; }
Example #7
Source File: AwsLogsAppender.java From logback-awslogs-appender with GNU Lesser General Public License v3.0 | 4 votes |
@SuppressWarnings({"unused", "WeakerAccess"}) public Layout<ILoggingEvent> getLayout() { return layout; }
Example #8
Source File: AwsLogsAppender.java From logback-awslogs-appender with GNU Lesser General Public License v3.0 | 4 votes |
@SuppressWarnings({"unused", "WeakerAccess"}) public void setLayout(Layout<ILoggingEvent> layout) { this.layout = layout; }
Example #9
Source File: RocketmqLogbackAppender.java From rocketmq with Apache License 2.0 | 4 votes |
public Layout getLayout() { return this.layout; }
Example #10
Source File: RocketmqLogbackAppender.java From rocketmq with Apache License 2.0 | 4 votes |
/** * Set the pattern layout to format the log. */ public void setLayout(Layout layout) { this.layout = layout; }
Example #11
Source File: FlumeLogstashV1Appender.java From logback-flume-appender with MIT License | 4 votes |
public void setLayout(Layout<ILoggingEvent> layout) { this.layout = layout; }
Example #12
Source File: LogCollector.java From jadx with Apache License 2.0 | 4 votes |
public void setLayout(Layout<ILoggingEvent> layout) { this.layout = layout; }
Example #13
Source File: Syslog4jAppender.java From logback-syslog4j with MIT License | 4 votes |
public void setLayout(Layout<E> layout) { this.layout = layout; }
Example #14
Source File: RedisAppender.java From logback-redis-appender with Apache License 2.0 | 4 votes |
public Layout<ILoggingEvent> getLayout() { return layout; }
Example #15
Source File: RedisAppender.java From logback-redis-appender with Apache License 2.0 | 4 votes |
public void setLayout(Layout<ILoggingEvent> layout) { this.layout = layout; }
Example #16
Source File: SMTPAppenderBase.java From lemon with Apache License 2.0 | 4 votes |
public Layout<E> getLayout() { return layout; }
Example #17
Source File: SMTPAppenderBase.java From lemon with Apache License 2.0 | 4 votes |
public void setLayout(Layout<E> layout) { this.layout = layout; }
Example #18
Source File: RocketmqLogbackAppender.java From DDMQ with Apache License 2.0 | 4 votes |
public Layout getLayout() { return this.layout; }
Example #19
Source File: AdvancedKafkaAppender.java From summerframework with Apache License 2.0 | 4 votes |
public void setLayout(Layout<ILoggingEvent> layout) { this.layout = layout; }
Example #20
Source File: RocketmqLogbackAppender.java From DDMQ with Apache License 2.0 | 4 votes |
/** * Set the pattern layout to format the log. */ public void setLayout(Layout layout) { this.layout = layout; }
Example #21
Source File: RocketmqLogbackAppender.java From rocketmq-4.3.0 with Apache License 2.0 | 4 votes |
public Layout getLayout() { return this.layout; }
Example #22
Source File: RocketmqLogbackAppender.java From rocketmq-4.3.0 with Apache License 2.0 | 4 votes |
/** * Set the pattern layout to format the log. */ public void setLayout(Layout layout) { this.layout = layout; }
Example #23
Source File: RedisAppender.java From jframework with Apache License 2.0 | 4 votes |
public Layout<ILoggingEvent> getLayout() { return layout; }
Example #24
Source File: RedisAppender.java From jframework with Apache License 2.0 | 4 votes |
public void setLayout(Layout<ILoggingEvent> layout) { this.layout = layout; }
Example #25
Source File: RocketmqLogbackAppender.java From rocketmq-read with Apache License 2.0 | 4 votes |
public Layout getLayout() { return this.layout; }
Example #26
Source File: RocketmqLogbackAppender.java From rocketmq-read with Apache License 2.0 | 4 votes |
/** * Set the pattern layout to format the log. */ public void setLayout(Layout layout) { this.layout = layout; }
Example #27
Source File: IrisKafkaAppender.java From arcusplatform with Apache License 2.0 | 4 votes |
public Layout<E> getLayout() { return layout; }
Example #28
Source File: IrisKafkaAppender.java From arcusplatform with Apache License 2.0 | 4 votes |
public void setLayout(Layout<E> layout) { this.layout = layout; }
Example #29
Source File: KafkaAppenderTest.java From kafka-logback with BSD 3-Clause "New" or "Revised" License | 4 votes |
ExceptionalTestKafkaAppender(String bootstrapservers, String topic, String valueSerialier, Layout<ILoggingEvent> layout) { super(bootstrapservers, topic, valueSerialier, layout); }
Example #30
Source File: RocketmqLogbackAppender.java From DDMQ with Apache License 2.0 | 4 votes |
public Layout getLayout() { return this.layout; }