Skip to content

Compare Kind references before checking log levels #252

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
wants to merge 1 commit into from

Conversation

dharkness
Copy link
Contributor

Assuming reference comparisons are much quicker than checking
the resolved logger level via the isFooEnabled() methods, reverse
the nested if() tests. Also, since the reference can match only
one of the instances, use else if to short-circuit the search.

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.

Assuming reference comparisons are much quicker than checking
likely-nested logger levels, perform the former first.

Also, since the reference can match only one of the instances,
use "else if" to short-circuit the search.
philwebb added a commit that referenced this pull request Mar 13, 2013
# By David Harkness
* patch-1:
  Compare Kind references before checking log levels
@philwebb
Copy link
Member

Thanks for the contribution! This has now been merged.

@philwebb philwebb closed this Mar 13, 2013
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.

2 participants