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

Allow configuring logger_class with statsd_host #1188

Merged
merged 3 commits into from Feb 19, 2016

Conversation

bloodearnest
Copy link
Contributor

Currently if you configure statsd_host, a configured logger_class will never be used.

I think this makes a user configured logger class always take priority.

(This is PoC change, I will come back and add tests/docs if it's worth pursuing)

@bloodearnest
Copy link
Contributor Author

This is a proposed fix for #1187

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 2, 2016

Is it the case that a user should probably not specify both arguments together? Should we issue a warning when both are provided?

@bloodearnest
Copy link
Contributor Author

On 2 February 2016 at 23:37, Randall Leeds notifications@github.com wrote:

Is it the case that a user should probably not specify both arguments
together? Should we issue a warning when both are provided

My use case is exactly that, though.

I did look at adding a warning about makeing sure that your custom logger
class inherited from the statsd logger, when both both are specified. But
since logging has not yet been initialised (by definition), I wasn't sure
how to do that. Is there a way to defer a warning until logging is
configured?

Thanks

Simon

Simon

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 11, 2016

I think this is fine. What do you think about maybe where you have the "N.B." in the docs for the statsd option to add a note that any custom logger class specified should be API-compatible with the statsd logger. That seems like a reasonable place to document this and easier than trying to issue a warning.

This is great, thank you.

@bloodearnest
Copy link
Contributor Author

On 11 February 2016 at 21:26, Randall Leeds notifications@github.com
wrote:

I think this is fine. What do you think about maybe where you have the
"N.B." in the docs for the statsd option to add a note that any custom
logger class specified should be API-compatible with the statsd logger.
That seems like a reasonable place to document this and easier than trying
to issue a warning.

Good idea, done.

This is great, thank you.

Thank you for taking the time to look at it :)

Simon

Currently if you configure statsd_host, a configured logger_class will never be used.

I think this makes a user configured logger class always take priority.

(This is PoC change, I will come back and add tests/docs if it's worth pursuing)
Previously, configuring statsd_host would override the configured class
@bloodearnest
Copy link
Contributor Author

Rebased on master, be great if you could land

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 19, 2016

Beautiful. Thanks for your effort and patience, @bloodearnest!

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.

None yet

2 participants