-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Gemfile:
gem 'logging-rails', require: 'logging/rails'config/loggin.rb
The original.
config/initializers/logging.rb:
Rails.application.configure do
if Rails.env.production?
config.log_to = %w[file]
config.show_log_configuration = false
else
config.log_to = %w[stdout]
config.show_log_configuration = true
end
endLog configuration:
root ............................................ *debug -T
- <Appenders::RollingFile:0x18f397c name="file">
ActionMailer::Base ............................ debug +A -T
ActiveRecord::Base ............................ debug +A -T
ActiveSupport::Cache::FileStore ............... debug +A -T
ActiveSupport::Dependencies ................... debug +A -T
Logging ....................................... *off -A -T
Rails ......................................... debug +A -TI tried to let the config on environments files, but the same effect, the Rails original logging was supressed, but I can't log. I tried:
Rails.logger.error 'foo' # true
Logging::Logger[::Rails].error 'foo' # true
::Logging::Logger[self].error 'foo' # trueThe problem is that log?: Logging ....................................... *off -A -T
If yes, What I need more to re-enable Rails logging with my manual one?
How is the logging calling? Rails.logger.xyz?
Thanks you.
Metadata
Metadata
Assignees
Labels
No labels