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

Use holder pattern for lazy deprecation loggers #26218

Merged
merged 2 commits into from Aug 15, 2017

Conversation

Projects
None yet
6 participants
@jasontedor
Copy link
Member

commented Aug 15, 2017

In a few places we need to lazy initialize static deprecation loggers. This is needed to avoid touching logging before logging is configured, but deprecation loggers that are used in foundational classes like settings and parsers would be initialized before logging is configured. Previously we used a lazy set once pattern which is fine, but there's a simpler approach: the holder pattern.

Relates #26210

Use holder pattern for lazy deprecation loggers
In a few places we need to lazy initialize static deprecation
loggers. This is needed to avoid touching logging before logging is
configured, but deprecation loggers that are used in foundational
classes like settings and parsers would be initialized before logging is
configured. Previously we used a lazy set once pattern which is fine,
but there's a simpler approach: the holder pattern.

@jasontedor jasontedor merged commit 729d35d into elastic:5.6 Aug 15, 2017

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci Build finished.
Details

jasontedor added a commit that referenced this pull request Aug 15, 2017

Use holder pattern for lazy deprecation loggers
In a few places we need to lazy initialize static deprecation
loggers. This is needed to avoid touching logging before logging is
configured, but deprecation loggers that are used in foundational
classes like settings and parsers would be initialized before logging is
configured. Previously we used a lazy set once pattern which is fine,
but there's a simpler approach: the holder pattern.

Relates #26218

jasontedor added a commit that referenced this pull request Aug 15, 2017

Use holder pattern for lazy deprecation loggers
In a few places we need to lazy initialize static deprecation
loggers. This is needed to avoid touching logging before logging is
configured, but deprecation loggers that are used in foundational
classes like settings and parsers would be initialized before logging is
configured. Previously we used a lazy set once pattern which is fine,
but there's a simpler approach: the holder pattern.

Relates #26218

jasontedor added a commit that referenced this pull request Aug 15, 2017

Use holder pattern for lazy deprecation loggers
In a few places we need to lazy initialize static deprecation
loggers. This is needed to avoid touching logging before logging is
configured, but deprecation loggers that are used in foundational
classes like settings and parsers would be initialized before logging is
configured. Previously we used a lazy set once pattern which is fine,
but there's a simpler approach: the holder pattern.

Relates #26218

@jasontedor jasontedor deleted the jasontedor:deprecation-logger-holder branch Aug 15, 2017

@jasontedor

This comment has been minimized.

Copy link
Member Author

commented Aug 15, 2017

Thanks @nik9000.

@elasticmachine

This comment has been minimized.

Copy link

commented Jan 29, 2019

@colings86 colings86 added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.