Skip to content

isNeedLogExecuteInfo #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ivanyang1984 opened this issue Jan 21, 2019 · 1 comment
Closed

isNeedLogExecuteInfo #4

ivanyang1984 opened this issue Jan 21, 2019 · 1 comment

Comments

@ivanyang1984
Copy link

isNeedLogExecuteInfo 这个方法 在运行时加载 类时。当经过
if (isNeeded) { Set<String> excludeClassRegexs = ConfigUtils.getExcludeClassRegexs(); if (null != excludeClassRegexs && !excludeClassRegexs.isEmpty()) { for (String regex : excludeClassRegexs) { isNeeded = !Pattern.matches(regex, className); if (!isNeeded) { System.err.println("regex = "+regex+", className"+className); break; } } } }
这段代码后,isNeeded 总会变false,
配置如下:
#\u9700\u8981\u76d1\u63a7\u7684\u5305\uff0c\u591a\u4e2a\u5305\u7528\u5206\u53f7\u5206\u9694 agent.include.package=com.v.photos.admin.utils.HttpUtils #\u4e0d\u9700\u8981\u76d1\u63a7\u7684\u5305\uff0c\u591a\u4e2a\u5305\u7528\u5206\u53f7\u5206\u9694\u3002 \u9700\u8981\u76d1\u63a7\u7684\u5305-\u4e0d\u9700\u8981\u76d1\u63a7\u7684\u5305\u5c31\u662f\u771f\u6b63\u8981\u76d1\u63a7\u7684\u5305 agent.exclude.package= #\u65e5\u5fd7\u6587\u4ef6\uff0c\u4f1a\u81ea\u52a8\u589e\u52a0\u65e5\u671f\u540e\u7f00 agent.log.file=C:\\opt\\log\\agent.log #\u65e5\u5fd7\u8f93\u51fa\u5468\u671f agent.log.interval.seconds=10 #\u4e0d\u9700\u8981\u76d1\u63a7\u7684\u7c7b\u7684\u6b63\u5219\u8868\u8fbe\u5f0f #agent.exclude.class.regex= #\u662f\u5426\u8bb0\u5f55\u5e73\u5747\u65f6\u95f4 agent.log.avg.execute.time=true #\u9ed8\u8ba4\u4e0d\u9700\u8981\u76d1\u63a7\u7684\u7c7b\u7684\u6b63\u5219\u8868\u8fbe\u5f0f agent.exclude.class.regex.default=.*EnhancerByCGLIB.*;.*FastClassByCGLIB.*;.*EnhancerBySpringCGLIB.*;*.FastClassBySpringCGLIB.* #\u8bb0\u5f55\u65b9\u6cd5\u7684\u8017\u65f6\u65f6\u662f\u91c7\u7528nanoTime,\u8fd8\u662fcurrentTimeMillis,nanoTime\u66f4\u51c6\u786e\uff0c\u4f46\u662f\u4f1a\u8017\u65f6\u4e00\u4e9b agent.log.nano=true agent.pojo.monitor.open=true

@dingjs
Copy link
Owner

dingjs commented Jan 23, 2019

你的配置可能不正确,你可以把agent.include.package=com.v.photos.admin.utils.HttpUtils 改一下,比如改成com.v验证一下。这个代码没问题。

@dingjs dingjs closed this as completed Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants