Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
killuaz丶x
SkyWalking
提交
acdbc5e1
S
SkyWalking
项目概览
killuaz丶x
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
acdbc5e1
编写于
2月 28, 2017
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove all common-log modules(useless).
上级
792cf9d1
变更
31
隐藏空白更改
内联
并排
Showing
31 changed file
with
57 addition
and
281 deletion
+57
-281
skywalking-commons/pom.xml
skywalking-commons/pom.xml
+0
-1
skywalking-commons/skywalking-logging/pom.xml
skywalking-commons/skywalking-logging/pom.xml
+0
-20
skywalking-commons/skywalking-logging/skywalking-logging-api/pom.xml
...commons/skywalking-logging/skywalking-logging-api/pom.xml
+0
-14
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/pom.xml
...skywalking-logging/skywalking-logging-impl-log4j2/pom.xml
+0
-32
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2Logger.java
.../eye/skywalking/api/logging/impl/log4j2/Log4j2Logger.java
+0
-70
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2Resolver.java
...ye/skywalking/api/logging/impl/log4j2/Log4j2Resolver.java
+0
-15
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/test/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2LoggerTest.java
.../skywalking/api/logging/impl/log4j2/Log4j2LoggerTest.java
+0
-47
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/test/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2ResolverTest.java
...kywalking/api/logging/impl/log4j2/Log4j2ResolverTest.java
+0
-18
skywalking-commons/skywalking-trace/pom.xml
skywalking-commons/skywalking-trace/pom.xml
+0
-5
skywalking-sniffer/skywalking-agent/src/main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java
...main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java
+2
-2
skywalking-sniffer/skywalking-api/pom.xml
skywalking-sniffer/skywalking-api/pom.xml
+0
-6
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/conf/SnifferConfigInitializer.java
...m/a/eye/skywalking/api/conf/SnifferConfigInitializer.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/EasyLogResolver.java
...ava/com/a/eye/skywalking/api/logging/EasyLogResolver.java
+0
-3
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/EasyLogger.java
...ain/java/com/a/eye/skywalking/api/logging/EasyLogger.java
+1
-8
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/ILog.java
.../src/main/java/com/a/eye/skywalking/api/logging/ILog.java
+3
-1
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/LogManager.java
...ain/java/com/a/eye/skywalking/api/logging/LogManager.java
+1
-1
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/LogResolver.java
...in/java/com/a/eye/skywalking/api/logging/LogResolver.java
+1
-1
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/NoopLogger.java
...ain/java/com/a/eye/skywalking/api/logging/NoopLogger.java
+9
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/AbstractClassEnhancePluginDefine.java
...ywalking/api/plugin/AbstractClassEnhancePluginDefine.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/PluginBootstrap.java
...java/com/a/eye/skywalking/api/plugin/PluginBootstrap.java
+4
-4
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/PluginResourcesResolver.java
.../a/eye/skywalking/api/plugin/PluginResourcesResolver.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/TracingBootstrap.java
...ava/com/a/eye/skywalking/api/plugin/TracingBootstrap.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassConstructorInterceptor.java
...ugin/interceptor/enhance/ClassConstructorInterceptor.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassEnhancePluginDefine.java
.../plugin/interceptor/enhance/ClassEnhancePluginDefine.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassInstanceMethodsInterceptor.java
.../interceptor/enhance/ClassInstanceMethodsInterceptor.java
+5
-5
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassStaticMethodsInterceptor.java
...in/interceptor/enhance/ClassStaticMethodsInterceptor.java
+5
-5
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/DefaultClassConstructorInterceptor.java
...terceptor/enhance/DefaultClassConstructorInterceptor.java
+2
-2
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/loader/InterceptorInstanceLoader.java
.../plugin/interceptor/loader/InterceptorInstanceLoader.java
+2
-2
skywalking-sniffer/skywalking-api/src/test/java/com/a/eye/skywalking/api/logging/LogManagerTest.java
...java/com/a/eye/skywalking/api/logging/LogManagerTest.java
+6
-1
skywalking-sniffer/skywalking-api/src/test/java/com/a/eye/skywalking/api/logging/NoopLoggerTest.java
...java/com/a/eye/skywalking/api/logging/NoopLoggerTest.java
+2
-2
skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-trace-context-activation/src/main/java/com/a/eye/skywalking/toolkit/activation/trace/TraceContextInterceptor.java
...ing/toolkit/activation/trace/TraceContextInterceptor.java
+2
-2
未找到文件。
skywalking-commons/pom.xml
浏览文件 @
acdbc5e1
...
...
@@ -12,7 +12,6 @@
<modules>
<module>
skywalking-trace
</module>
<module>
skywalking-logging
</module>
<module>
skywalking-util
</module>
</modules>
...
...
skywalking-commons/skywalking-logging/pom.xml
已删除
100644 → 0
浏览文件 @
792cf9d1
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
skywalking-commons
</artifactId>
<groupId>
com.a.eye
</groupId>
<version>
3.0-2017
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
skywalking-logging
</artifactId>
<packaging>
pom
</packaging>
<name>
skywalking-logging
</name>
<url>
http://maven.apache.org
</url>
<modules>
<module>
skywalking-logging-api
</module>
<module>
skywalking-logging-impl-log4j2
</module>
</modules>
</project>
skywalking-commons/skywalking-logging/skywalking-logging-api/pom.xml
已删除
100644 → 0
浏览文件 @
792cf9d1
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
skywalking-logging
</artifactId>
<groupId>
com.a.eye
</groupId>
<version>
3.0-2017
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<artifactId>
skywalking-logging-api
</artifactId>
</project>
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/pom.xml
已删除
100644 → 0
浏览文件 @
792cf9d1
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
skywalking-logging
</artifactId>
<groupId>
com.a.eye
</groupId>
<version>
3.0-2017
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<artifactId>
skywalking-logging-impl-log4j2
</artifactId>
<dependencies>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-logging-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.6.2
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-core
</artifactId>
<version>
2.6.2
</version>
</dependency>
</dependencies>
</project>
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2Logger.java
已删除
100644 → 0
浏览文件 @
792cf9d1
package
com.a.eye.skywalking.api.logging.impl.log4j2
;
import
com.a.eye.skywalking.api.logging.api.ILog
;
import
org.apache.logging.log4j.Logger
;
/**
* Created by wusheng on 2016/11/11.
*/
public
class
Log4j2Logger
implements
ILog
{
private
Logger
logger
;
public
Log4j2Logger
(
Logger
logger
)
{
this
.
logger
=
logger
;
}
@Override
public
void
info
(
String
message
)
{
logger
.
info
(
message
);
}
@Override
public
void
info
(
String
message
,
Object
...
arguments
)
{
logger
.
info
(
message
,
arguments
);
}
@Override
public
void
warn
(
String
format
,
Object
...
arguments
)
{
logger
.
warn
(
format
,
arguments
);
}
@Override
public
void
error
(
String
message
,
Throwable
e
)
{
logger
.
error
(
message
,
e
);
}
@Override
public
boolean
isDebugEnable
()
{
return
logger
.
isDebugEnabled
();
}
@Override
public
boolean
isInfoEnable
()
{
return
logger
.
isInfoEnabled
();
}
@Override
public
boolean
isWarnEnable
()
{
return
logger
.
isWarnEnabled
();
}
@Override
public
boolean
isErrorEnable
()
{
return
logger
.
isErrorEnabled
();
}
@Override
public
void
debug
(
String
format
)
{
logger
.
debug
(
format
);
}
@Override
public
void
debug
(
String
format
,
Object
...
arguments
)
{
logger
.
debug
(
format
,
arguments
);
}
@Override
public
void
error
(
String
format
)
{
logger
.
error
(
format
);
}
}
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2Resolver.java
已删除
100644 → 0
浏览文件 @
792cf9d1
package
com.a.eye.skywalking.api.logging.impl.log4j2
;
import
com.a.eye.skywalking.api.logging.api.ILog
;
import
com.a.eye.skywalking.api.logging.api.LogResolver
;
import
org.apache.logging.log4j.LogManager
;
/**
* Created by wusheng on 2016/11/11.
*/
public
class
Log4j2Resolver
implements
LogResolver
{
@Override
public
ILog
getLogger
(
Class
<?>
clazz
)
{
return
new
Log4j2Logger
(
LogManager
.
getLogger
(
clazz
));
}
}
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/test/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2LoggerTest.java
已删除
100644 → 0
浏览文件 @
792cf9d1
package
com.a.eye.skywalking.api.logging.impl.log4j2
;
import
org.apache.logging.log4j.Logger
;
import
org.junit.Test
;
import
static
org
.
mockito
.
Mockito
.
spy
;
import
static
org
.
mockito
.
Mockito
.
times
;
import
static
org
.
mockito
.
Mockito
.
verify
;
/**
* Created by wusheng on 2017/2/28.
*/
public
class
Log4j2LoggerTest
{
@Test
public
void
testLogProxy
(){
Logger
mockLogger
=
spy
(
Logger
.
class
);
Log4j2Logger
logger
=
new
Log4j2Logger
(
mockLogger
);
logger
.
isDebugEnable
();
verify
(
mockLogger
,
times
(
1
)).
isDebugEnabled
();
logger
.
isInfoEnable
();
verify
(
mockLogger
,
times
(
1
)).
isInfoEnabled
();
logger
.
isWarnEnable
();
verify
(
mockLogger
,
times
(
1
)).
isWarnEnabled
();
logger
.
isErrorEnable
();
verify
(
mockLogger
,
times
(
1
)).
isErrorEnabled
();
logger
.
debug
(
"string"
);
verify
(
mockLogger
,
times
(
1
)).
debug
(
"string"
);
logger
.
debug
(
"string"
,
"arg1"
,
"args"
);
verify
(
mockLogger
,
times
(
1
)).
debug
(
"string"
,
new
Object
[]{
"arg1"
,
"args"
});
logger
.
info
(
"string"
);
verify
(
mockLogger
,
times
(
1
)).
info
(
"string"
);
logger
.
info
(
"string"
,
"arg1"
,
"args"
);
verify
(
mockLogger
,
times
(
1
)).
info
(
"string"
,
new
Object
[]{
"arg1"
,
"args"
});
logger
.
warn
(
"string"
,
"arg1"
,
"args"
);
verify
(
mockLogger
,
times
(
1
)).
warn
(
"string"
,
new
Object
[]{
"arg1"
,
"args"
});
logger
.
error
(
"string"
);
verify
(
mockLogger
,
times
(
1
)).
error
(
"string"
);
NullPointerException
exception
=
new
NullPointerException
();
logger
.
error
(
"string"
,
exception
);
verify
(
mockLogger
,
times
(
1
)).
error
(
"string"
,
exception
);
}
}
skywalking-commons/skywalking-logging/skywalking-logging-impl-log4j2/src/test/java/com/a/eye/skywalking/api/logging/impl/log4j2/Log4j2ResolverTest.java
已删除
100644 → 0
浏览文件 @
792cf9d1
package
com.a.eye.skywalking.api.logging.impl.log4j2
;
import
com.a.eye.skywalking.api.logging.api.ILog
;
import
org.junit.Assert
;
import
org.junit.Test
;
/**
* Created by wusheng on 2017/2/28.
*/
public
class
Log4j2ResolverTest
{
@Test
public
void
testGetLogger
()
{
Log4j2Resolver
resolver
=
new
Log4j2Resolver
();
ILog
logger
=
resolver
.
getLogger
(
Log4j2ResolverTest
.
class
);
Assert
.
assertTrue
(
logger
instanceof
Log4j2Logger
);
}
}
skywalking-commons/skywalking-trace/pom.xml
浏览文件 @
acdbc5e1
...
...
@@ -12,11 +12,6 @@
<artifactId>
skywalking-trace
</artifactId>
<dependencies>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-logging-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-util
</artifactId>
...
...
skywalking-sniffer/skywalking-agent/src/main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java
浏览文件 @
acdbc5e1
...
...
@@ -4,8 +4,8 @@ import com.a.eye.skywalking.agent.junction.SkyWalkingEnhanceMatcher;
import
com.a.eye.skywalking.api.conf.Config
;
import
com.a.eye.skywalking.api.conf.SnifferConfigInitializer
;
import
com.a.eye.skywalking.api.logging.EasyLogResolver
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.AbstractClassEnhancePluginDefine
;
import
com.a.eye.skywalking.api.plugin.PluginBootstrap
;
import
com.a.eye.skywalking.api.plugin.PluginFinder
;
...
...
skywalking-sniffer/skywalking-api/pom.xml
浏览文件 @
acdbc5e1
...
...
@@ -20,7 +20,6 @@
</properties>
<dependencies>
<dependency>
<groupId>
net.bytebuddy
</groupId>
<artifactId>
byte-buddy
</artifactId>
...
...
@@ -36,11 +35,6 @@
<artifactId>
disruptor
</artifactId>
<version>
3.3.6
</version>
</dependency>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-logging-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
<plugins>
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/conf/SnifferConfigInitializer.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.conf
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.util.ConfigInitializer
;
import
com.a.eye.skywalking.api.util.StringUtil
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/EasyLogResolver.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
;
import
com.a.eye.skywalking.api.logging.api.ILog
;
import
com.a.eye.skywalking.api.logging.api.LogResolver
;
/**
* Created by wusheng on 2016/11/26.
*/
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging/EasyLogger.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
;
import
com.a.eye.skywalking.api.logging.api.ILog
;
import
com.a.eye.skywalking.api.util.LoggingUtil
;
import
java.net.URLEncoder
;
import
java.text.SimpleDateFormat
;
...
...
@@ -76,18 +74,13 @@ public class EasyLogger implements ILog {
logger
(
WARN
,
replaceParam
(
format
,
arguments
),
null
);
}
@Override
public
void
warn
(
String
format
,
Object
arguments
,
Throwable
e
)
{
logger
(
WARN
,
replaceParam
(
format
,
arguments
),
e
);
}
@Override
public
void
error
(
String
format
,
Throwable
e
)
{
logger
(
ERROR
,
format
,
e
);
}
@Override
public
void
error
(
String
format
,
Object
arguments
,
Throwable
e
)
{
public
void
error
(
Throwable
e
,
String
format
,
Object
...
arguments
)
{
logger
(
ERROR
,
replaceParam
(
format
,
arguments
),
e
);
}
...
...
skywalking-
commons/skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/api/logging/api
/ILog.java
→
skywalking-
sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging
/ILog.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
.api
;
package
com.a.eye.skywalking.api.logging
;
/**
* The Log interface.
...
...
@@ -16,6 +16,8 @@ public interface ILog {
void
error
(
String
format
,
Throwable
e
);
void
error
(
Throwable
e
,
String
format
,
Object
...
arguments
);
boolean
isDebugEnable
();
boolean
isInfoEnable
();
...
...
skywalking-
commons/skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/api/logging/api
/LogManager.java
→
skywalking-
sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging
/LogManager.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
.api
;
package
com.a.eye.skywalking.api.logging
;
/**
* LogManager is the {@link LogResolver} implementation manager.
...
...
skywalking-
commons/skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/api/logging/api
/LogResolver.java
→
skywalking-
sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging
/LogResolver.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
.api
;
package
com.a.eye.skywalking.api.logging
;
/**
* {@link LogResolver} just do only one thing: return the {@link ILog} implementation.
...
...
skywalking-
commons/skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/api/logging/api
/NoopLogger.java
→
skywalking-
sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/logging
/NoopLogger.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
.api
;
package
com.a.eye.skywalking.api.logging
;
/**
...
...
@@ -8,7 +8,9 @@ package com.a.eye.skywalking.api.logging.api;
* Created by xin on 2016/11/10.
*/
public
enum
NoopLogger
implements
ILog
{
INSTANCE
;
INSTANCE
{
};
@Override
public
void
info
(
String
message
)
{
...
...
@@ -64,4 +66,9 @@ public enum NoopLogger implements ILog {
public
void
error
(
String
format
)
{
}
@Override
public
void
error
(
Throwable
e
,
String
format
,
Object
...
arguments
)
{
}
}
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/AbstractClassEnhancePluginDefine.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.interceptor.enhance.ClassEnhancePluginDefine
;
import
com.a.eye.skywalking.api.util.StringUtil
;
import
net.bytebuddy.dynamic.DynamicType
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/PluginBootstrap.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
net.bytebuddy.pool.TypePool
;
import
java.net.URL
;
...
...
@@ -37,7 +37,7 @@ public class PluginBootstrap {
try
{
PluginCfg
.
INSTANCE
.
load
(
pluginUrl
.
openStream
());
}
catch
(
Throwable
t
)
{
logger
.
error
(
"plugin [{}] init failure."
,
new
Object
[]
{
pluginUrl
},
t
);
logger
.
error
(
t
,
"plugin [{}] init failure."
,
pluginUrl
);
}
}
...
...
@@ -52,7 +52,7 @@ public class PluginBootstrap {
plugin
.
setClassTypePool
(
classTypePool
);
plugins
.
add
(
plugin
);
}
catch
(
Throwable
t
)
{
logger
.
error
(
"loade plugin [{}] failure."
,
new
Object
[]
{
pluginClassName
},
t
);
logger
.
error
(
t
,
"loade plugin [{}] failure."
,
pluginClassName
);
}
}
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/PluginResourcesResolver.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
java.io.IOException
;
import
java.net.URL
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/TracingBootstrap.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
net.bytebuddy.ByteBuddy
;
import
net.bytebuddy.dynamic.ClassFileLocator
;
import
net.bytebuddy.dynamic.DynamicType
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassConstructorInterceptor.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin.interceptor.enhance
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.interceptor.loader.InterceptorInstanceLoader
;
import
com.a.eye.skywalking.api.plugin.interceptor.EnhancedClassInstanceContext
;
import
net.bytebuddy.implementation.bind.annotation.AllArguments
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassEnhancePluginDefine.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin.interceptor.enhance
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.AbstractClassEnhancePluginDefine
;
import
com.a.eye.skywalking.api.plugin.PluginException
;
import
com.a.eye.skywalking.api.plugin.interceptor.ConstructorInterceptPoint
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassInstanceMethodsInterceptor.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin.interceptor.enhance
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.interceptor.loader.InterceptorInstanceLoader
;
import
com.a.eye.skywalking.api.plugin.interceptor.EnhancedClassInstanceContext
;
import
net.bytebuddy.implementation.bind.annotation.*
;
...
...
@@ -55,7 +55,7 @@ public class ClassInstanceMethodsInterceptor {
try
{
interceptor
.
beforeMethod
(
instanceContext
,
interceptorContext
,
result
);
}
catch
(
Throwable
t
)
{
logger
.
error
(
"class[{}] before method[{}] intercept failue:{}"
,
new
Object
[]
{
obj
.
getClass
(),
method
.
getName
(),
t
.
getMessage
()},
t
);
logger
.
error
(
t
,
"class[{}] before method[{}] intercept failure"
,
obj
.
getClass
(),
method
.
getName
()
);
}
Object
ret
=
null
;
...
...
@@ -69,14 +69,14 @@ public class ClassInstanceMethodsInterceptor {
try
{
interceptor
.
handleMethodException
(
t
,
instanceContext
,
interceptorContext
);
}
catch
(
Throwable
t2
)
{
logger
.
error
(
"class[{}] handle method[{}] exception failue:{}"
,
new
Object
[]
{
obj
.
getClass
(),
method
.
getName
(),
t2
.
getMessage
()},
t2
);
logger
.
error
(
t2
,
"class[{}] handle method[{}] exception failure"
,
obj
.
getClass
(),
method
.
getName
()
);
}
throw
t
;
}
finally
{
try
{
ret
=
interceptor
.
afterMethod
(
instanceContext
,
interceptorContext
,
ret
);
}
catch
(
Throwable
t
)
{
logger
.
error
(
"class[{}] after method[{}] intercept failue:{}"
,
new
Object
[]
{
obj
.
getClass
(),
method
.
getName
(),
t
.
getMessage
()},
t
);
logger
.
error
(
t
,
"class[{}] after method[{}] intercept failure"
,
obj
.
getClass
(),
method
.
getName
()
);
}
}
return
ret
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/ClassStaticMethodsInterceptor.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin.interceptor.enhance
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.interceptor.loader.InterceptorInstanceLoader
;
import
net.bytebuddy.implementation.bind.annotation.AllArguments
;
import
net.bytebuddy.implementation.bind.annotation.Origin
;
...
...
@@ -55,7 +55,7 @@ public class ClassStaticMethodsInterceptor {
try
{
interceptor
.
beforeMethod
(
interceptorContext
,
result
);
}
catch
(
Throwable
t
)
{
logger
.
error
(
"class[{}] before static method[{}] intercept failue:{}"
,
new
Object
[]
{
clazz
,
method
.
getName
(),
t
.
getMessage
()},
t
);
logger
.
error
(
t
,
"class[{}] before static method[{}] intercept failure"
,
clazz
,
method
.
getName
()
);
}
...
...
@@ -70,14 +70,14 @@ public class ClassStaticMethodsInterceptor {
try
{
interceptor
.
handleMethodException
(
t
,
interceptorContext
);
}
catch
(
Throwable
t2
)
{
logger
.
error
(
"class[{}] handle static method[{}] exception failue:{}"
,
new
Object
[]
{
clazz
,
method
.
getName
(),
t2
.
getMessage
()},
t2
);
logger
.
error
(
t2
,
"class[{}] handle static method[{}] exception failure"
,
clazz
,
method
.
getName
(),
t2
.
getMessage
()
);
}
throw
t
;
}
finally
{
try
{
ret
=
interceptor
.
afterMethod
(
interceptorContext
,
ret
);
}
catch
(
Throwable
t
)
{
logger
.
error
(
"class[{}] after static method[{}] intercept failue:{}"
,
new
Object
[]
{
clazz
,
method
.
getName
(),
t
.
getMessage
()},
t
);
logger
.
error
(
t
,
"class[{}] after static method[{}] intercept failure:{}"
,
clazz
,
method
.
getName
(),
t
.
getMessage
()
);
}
}
return
ret
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/enhance/DefaultClassConstructorInterceptor.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin.interceptor.enhance
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.interceptor.EnhancedClassInstanceContext
;
import
net.bytebuddy.implementation.bind.annotation.AllArguments
;
import
net.bytebuddy.implementation.bind.annotation.FieldProxy
;
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/api/plugin/interceptor/loader/InterceptorInstanceLoader.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.plugin.interceptor.loader
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
java.io.BufferedInputStream
;
import
java.io.ByteArrayOutputStream
;
...
...
skywalking-
commons/skywalking-logging/skywalking-logging-api/src/test/java/com/a/eye/skywalking/api/logging/api
/LogManagerTest.java
→
skywalking-
sniffer/skywalking-api/src/test/java/com/a/eye/skywalking/api/logging
/LogManagerTest.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
.api
;
package
com.a.eye.skywalking.api.logging
;
import
org.junit.After
;
import
org.junit.Assert
;
...
...
@@ -54,6 +54,10 @@ public class LogManagerTest {
}
@Override
public
void
error
(
Throwable
e
,
String
format
,
Object
...
arguments
)
{
}
@Override
public
boolean
isDebugEnable
()
{
return
false
;
}
...
...
@@ -83,3 +87,4 @@ public class LogManagerTest {
}
}
}
skywalking-
commons/skywalking-logging/skywalking-logging-api/src/test/java/com/a/eye/skywalking/api/logging/api
/NoopLoggerTest.java
→
skywalking-
sniffer/skywalking-api/src/test/java/com/a/eye/skywalking/api/logging
/NoopLoggerTest.java
浏览文件 @
acdbc5e1
package
com.a.eye.skywalking.api.logging
.api
;
package
com.a.eye.skywalking.api.logging
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
static
com
.
a
.
eye
.
skywalking
.
api
.
logging
.
api
.
NoopLogger
.
INSTANCE
;
import
static
com
.
a
.
eye
.
skywalking
.
api
.
logging
.
NoopLogger
.
INSTANCE
;
/**
* Created by wusheng on 2017/2/27.
...
...
skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-trace-context-activation/src/main/java/com/a/eye/skywalking/toolkit/activation/trace/TraceContextInterceptor.java
浏览文件 @
acdbc5e1
...
...
@@ -2,8 +2,8 @@ package com.a.eye.skywalking.toolkit.activation.trace;
import
com.a.eye.skywalking.api.context.ContextCarrier
;
import
com.a.eye.skywalking.api.context.ContextManager
;
import
com.a.eye.skywalking.api.logging.
api.
ILog
;
import
com.a.eye.skywalking.api.logging.
api.
LogManager
;
import
com.a.eye.skywalking.api.logging.ILog
;
import
com.a.eye.skywalking.api.logging.LogManager
;
import
com.a.eye.skywalking.api.plugin.interceptor.enhance.MethodInterceptResult
;
import
com.a.eye.skywalking.api.plugin.interceptor.enhance.MethodInvokeContext
;
import
com.a.eye.skywalking.api.plugin.interceptor.enhance.StaticMethodInvokeContext
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录