Add comments on “application-toolkit” module.

This commit is contained in:
wusheng 2017-01-09 11:44:02 +08:00
parent f5de30b101
commit 1ab4858f8a
3 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,9 @@ import org.apache.log4j.helpers.PatternConverter;
import org.apache.log4j.spi.LoggingEvent;
/**
* Default implementation outputs "TID: N/A".
* But, if in sky-walking agent active mode, output will become the real TraceId.
* <p>
* Created by wusheng on 2016/12/7.
*/

View File

@ -3,8 +3,12 @@ package com.a.eye.skywalking.toolkit.log.log4j.v1.x;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.helpers.PatternParser;
import org.apache.log4j.spi.LoggingEvent;
/**
* The log4j extend pattern.
* By using this pattern, if sky-walking agent is also active, {@link PatternParser#finalizeConverter(char)} method will be override dynamic.
* <p>
* Created by wusheng on 2016/12/7.
*/
public class TraceIdPatternLayout extends PatternLayout {

View File

@ -3,9 +3,10 @@ package com.a.eye.skywalking.toolkit.log.log4j.v1.x;
import org.apache.log4j.helpers.PatternParser;
/**
* Base on '%T', use {@link TraceIdPatternConverter} to convert the '%t' to traceId.
* <p>
* Created by wusheng on 2016/12/7.
*/
public class TraceIdPatternParser extends PatternParser {
public TraceIdPatternParser(String pattern) {
super(pattern);