-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
Add Ability to Use Rails Initializer File #62
Comments
I just ran into this. I'd prefer to move all lograge setup to its own file, rather than dumping it all into |
No movement on this. Closing. |
dburt
added a commit
to allori/lograge
that referenced
this issue
May 28, 2015
Fixes issue roidrage#62. This patch allows config.lograge.* to be set effectively in config/initializers/* by delaying the Railtie until after_initialize. Because Railtie initializers run before those app initializers, and the Lograge initializer loads the system only if config.enabled is set at the time it runs, changing config.lograge in config/initializers/* was previously ineffective. A better solution yet would be to always assume enabled=true and let enabling and disabling happen in the Gemfile or app initializers using simply `require 'lograge'`.
dburt
added a commit
to allori/lograge
that referenced
this issue
Jun 9, 2015
dburt
added a commit
to allori/lograge
that referenced
this issue
Jun 10, 2015
Fixes issue roidrage#62. This patch allows config.lograge.* to be set effectively in config/initializers/* by delaying the Railtie until after_initialize. Because Railtie initializers run before those app initializers, and the Lograge initializer loads the system only if config.enabled is set at the time it runs, changing config.lograge in config/initializers/* was previously ineffective. A better solution yet would be to always assume enabled=true and let enabling and disabling happen in the Gemfile or app initializers using simply `require 'lograge'`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd prefer to keep my configuration of whether Lograge is enabled inside chamber settings files and to use
config/initializers/logger.rb
to enable any of my logging setup.Unfortunately it appears that the initializer hook that Lograge hooks into in its railtie happens before any initializers are run. So if I put:
as is suggested by the README, it doesn't work. And to be thorough it doesn't work even if I put
true
rather than theChamber
bit.The text was updated successfully, but these errors were encountered: