Skip to content
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

[LOGMGR-187] The ClassLoaderLogContextSelector should keep searching … #162

Merged
merged 1 commit into from
Jan 19, 2018

Conversation

jamezp
Copy link
Member

@jamezp jamezp commented Dec 15, 2017

…the call stack to find a log context.

In previous versions of the ClassLoaderLogContextSelector the entire call stack was searched. #160 introduced the JDKSpecific which short circuits when it finds the first matching class. That short circuits too early for this selector and it's the reason the CallerClassLoaderLogContextSelector was introduced.

This PR adds a new Collection<Class<?>> findCallingClasses(Set<ClassLoader> rejectClassLoaders) method to allow all valid callers to be returned.

@jamezp
Copy link
Member Author

jamezp commented Jan 19, 2018

In cases where there is a registered LogContext this will slightly decrease performance. However in the experience of WildFly in most cases the entire call stack will be searched anyway. In most cases it would be suggested to use the CallerClassLoaderLogContextSelector. WildFly itself will switch to this new context selector.

@jamezp jamezp merged commit 72ac257 into jboss-logging:master Jan 19, 2018
@jamezp jamezp deleted the LOGMGR-187 branch January 19, 2018 17:48
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

Successfully merging this pull request may close these issues.

1 participant