Skip to content

Commit 05b818e

Browse files
committed
Update package name to org.apache.skywalking
1 parent b16d23c commit 05b818e

File tree

2,260 files changed

+78285
-59712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,260 files changed

+78285
-59712
lines changed
File renamed without changes.

ApacheCopyright renamed to HEADER

File renamed without changes.

apm-application-toolkit/apm-toolkit-log4j-1.x/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<repository>
6565
<id>bintray-wu-sheng-sky-walking-repository</id>
6666
<name>wu-sheng-sky-walking-repository</name>
67-
<url>https://api.bintray.com/maven/wu-sheng/skywalking/org.skywalking.apm-toolkit-log4j-1.x/;publish=1
67+
<url>https://api.bintray.com/maven/wu-sheng/skywalking/org.apache.skywalking.apm-toolkit-log4j-1.x/;publish=1
6868
</url>
6969
</repository>
7070
</distributionManagement>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
/*
20+
* Licensed to the Apache Software Foundation (ASF) under one or more
21+
* contributor license agreements. See the NOTICE file distributed with
22+
* this work for additional information regarding copyright ownership.
23+
* The ASF licenses this file to You under the Apache License, Version 2.0
24+
* (the "License"); you may not use this file except in compliance with
25+
* the License. You may obtain a copy of the License at
26+
*
27+
* http://www.apache.org/licenses/LICENSE-2.0
28+
*
29+
* Unless required by applicable law or agreed to in writing, software
30+
* distributed under the License is distributed on an "AS IS" BASIS,
31+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32+
* See the License for the specific language governing permissions and
33+
* limitations under the License.
34+
*
35+
*/
36+
37+
package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
38+
39+
import org.apache.log4j.helpers.PatternConverter;
40+
import org.apache.log4j.spi.LoggingEvent;
41+
42+
/**
43+
* Default implementation outputs "TID: N/A".
44+
* But, if in sky-walking agent active mode, output will become the real ids.
45+
* <p>
46+
* Created by wusheng on 2016/12/7.
47+
*/
48+
49+
public class TraceIdPatternConverter extends PatternConverter {
50+
@Override
51+
protected String convert(LoggingEvent loggingEvent) {
52+
return "TID: N/A";
53+
}
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
/*
20+
* Licensed to the Apache Software Foundation (ASF) under one or more
21+
* contributor license agreements. See the NOTICE file distributed with
22+
* this work for additional information regarding copyright ownership.
23+
* The ASF licenses this file to You under the Apache License, Version 2.0
24+
* (the "License"); you may not use this file except in compliance with
25+
* the License. You may obtain a copy of the License at
26+
*
27+
* http://www.apache.org/licenses/LICENSE-2.0
28+
*
29+
* Unless required by applicable law or agreed to in writing, software
30+
* distributed under the License is distributed on an "AS IS" BASIS,
31+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32+
* See the License for the specific language governing permissions and
33+
* limitations under the License.
34+
*
35+
*/
36+
37+
package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
38+
39+
import org.apache.log4j.PatternLayout;
40+
import org.apache.log4j.helpers.PatternParser;
41+
42+
/**
43+
* The log4j extend pattern. By using this pattern, if sky-walking agent is also active, {@link
44+
* PatternParser#finalizeConverter(char)} method will be override dynamic. <p>
45+
*
46+
* @author wusheng
47+
*/
48+
public class TraceIdPatternLayout extends PatternLayout {
49+
@Override
50+
protected PatternParser createPatternParser(String pattern) {
51+
return new TraceIdPatternParser(pattern);
52+
}
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
/*
20+
* Licensed to the Apache Software Foundation (ASF) under one or more
21+
* contributor license agreements. See the NOTICE file distributed with
22+
* this work for additional information regarding copyright ownership.
23+
* The ASF licenses this file to You under the Apache License, Version 2.0
24+
* (the "License"); you may not use this file except in compliance with
25+
* the License. You may obtain a copy of the License at
26+
*
27+
* http://www.apache.org/licenses/LICENSE-2.0
28+
*
29+
* Unless required by applicable law or agreed to in writing, software
30+
* distributed under the License is distributed on an "AS IS" BASIS,
31+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32+
* See the License for the specific language governing permissions and
33+
* limitations under the License.
34+
*
35+
*/
36+
37+
package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
38+
39+
import org.apache.log4j.helpers.PatternParser;
40+
41+
/**
42+
* Base on '%T', use {@link TraceIdPatternConverter} to convert the '%t' to traceId.
43+
* <p>
44+
* Created by wusheng on 2016/12/7.
45+
*/
46+
public class TraceIdPatternParser extends PatternParser {
47+
public TraceIdPatternParser(String pattern) {
48+
super(pattern);
49+
}
50+
51+
@Override
52+
protected void finalizeConverter(char c) {
53+
if ('T' == c) {
54+
addConverter(new TraceIdPatternConverter());
55+
} else {
56+
super.finalizeConverter(c);
57+
}
58+
}
59+
}

apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternConverter.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternLayout.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternParser.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

apm-application-toolkit/apm-toolkit-log4j-2.x/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<repository>
6565
<id>bintray-wu-sheng-sky-walking-repository</id>
6666
<name>wu-sheng-sky-walking-repository</name>
67-
<url>https://api.bintray.com/maven/wu-sheng/skywalking/org.skywalking.apm-toolkit-log4j-2.x/;publish=1
67+
<url>https://api.bintray.com/maven/wu-sheng/skywalking/org.apache.skywalking.apm-toolkit-log4j-2.x/;publish=1
6868
</url>
6969
</repository>
7070
</distributionManagement>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
/*
20+
* Licensed to the Apache Software Foundation (ASF) under one or more
21+
* contributor license agreements. See the NOTICE file distributed with
22+
* this work for additional information regarding copyright ownership.
23+
* The ASF licenses this file to You under the Apache License, Version 2.0
24+
* (the "License"); you may not use this file except in compliance with
25+
* the License. You may obtain a copy of the License at
26+
*
27+
* http://www.apache.org/licenses/LICENSE-2.0
28+
*
29+
* Unless required by applicable law or agreed to in writing, software
30+
* distributed under the License is distributed on an "AS IS" BASIS,
31+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32+
* See the License for the specific language governing permissions and
33+
* limitations under the License.
34+
*
35+
*/
36+
37+
package org.apache.skywalking.apm.toolkit.log.log4j.v2.x;
38+
39+
/**
40+
* Created by wusheng on 2016/12/11.
41+
*/
42+
public class Log4j2OutputAppender {
43+
/**
44+
* As default, append "TID: N/A" to the output message,
45+
* if sky-walking agent in active mode, append the real traceId in the recent Context, if existed, or empty String.
46+
*
47+
* @param toAppendTo origin output message.
48+
*/
49+
public static void append(StringBuilder toAppendTo) {
50+
toAppendTo.append("TID: N/A");
51+
}
52+
}

0 commit comments

Comments
 (0)