-
Notifications
You must be signed in to change notification settings - Fork 137
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
Reinit warning suppression #198
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There's a superfluous </dd> floating around. Rip it out.
Currently if you call `rollbar.init()` twice you see a warning about the re-init. This is annoying in configurations where `init()` is _expected_ to be called twice. One such configuration is a Django project where the rollbar middleware is installed (which calls `rollbar.init()` internally), but the project also needs to be able to run without the middleware (from headless scripts, etc.), which requires that you call `rollbar.init()`. The current recommendation [1] is to just live with the warning message. I've personally taken that approach for the past year but have finally grown weary enough of the warning message to warrant some action :). Without this change my logs have the re-init warning scattered about: WARNING:rollbar:Rollbar already initialized. Ignoring re-init. Performing system checks... System check identified no issues (0 silenced). September 25, 2017 - 14:29:19 Django version 1.9.10, using settings 'unicorn.settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C. WARNING:rollbar:Rollbar already initialized. Ignoring re-init. With this change, no more warnings: Performing system checks... System check identified no issues (0 silenced). September 25, 2017 - 14:30:56 Django version 1.9.10, using settings 'unicorn.settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C. Related to rollbar#100 and rollbar#145 [1] rollbar#100 (comment)
Seems reasonable |
This was referenced Oct 19, 2017
This was referenced Oct 27, 2017
This was referenced Dec 8, 2017
4 tasks
jwalgran
added a commit
to opensupplyhub/open-apparel-registry
that referenced
this pull request
Jul 2, 2019
Removes a warning in the Django log output. The PR to pyrollbar that introduced this flag explains how, in our situation, calling init twice is expected. > Currently if you call rollbar.init() twice you see a warning about the > re-init. This is annoying in configurations where init() is expected to be > called twice. One such configuration is a Django project where the rollbar > middleware is installed (which calls rollbar.init() internally), but the > project also needs to be able to run without the middleware (from headless > scripts, etc.), which requires that you call rollbar.init(). rollbar/pyrollbar#198
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently if you call
rollbar.init()
twice you see a warning about there-init. This is annoying in configurations where
init()
is expectedto be called twice. One such configuration is a Django project where the
rollbar middleware is installed (which calls
rollbar.init()
internally),but the project also needs to be able to run without the middleware (from
headless scripts, etc.), which requires that you call
rollbar.init()
.The current recommendation [1] is to just live with the warning message.
I've personally taken that approach for the past year but have finally
grown weary enough of the warning message to warrant some action :).
Without this change my logs have the re-init warning scattered about:
With this change, no more warnings:
Related to #100 and #145
[1] #100 (comment)