You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to configure sequel-rails in various environments to log to a separate logfile from rails's.
Following the pattern of ActiveRecord, where one would put a line like this into an environment config file:
config.active_record.logger = nil
I am trying:
Rails.application.configure do
config.cache_classes = false
...
...
config.sequel.logger = SomeSpecialLogger.new(STDOUT)
end
In this block config.sequel.logger seems to be nil anyway (I am somehow expecting it to be assigned), and assigning it here seems to be overwritten later.
Either I am doing something wrong, or sequel-rails is not designed to have a logger set at this point in the rails initialization process. I do seem to be apple to apply a different logger in an initializer, like this:
Hi,
I am trying to configure
sequel-rails
in various environments to log to a separate logfile from rails's.Following the pattern of ActiveRecord, where one would put a line like this into an environment config file:
I am trying:
In this block
config.sequel.logger
seems to benil
anyway (I am somehow expecting it to be assigned), and assigning it here seems to be overwritten later.Either I am doing something wrong, or
sequel-rails
is not designed to have a logger set at this point in the rails initialization process. I do seem to be apple to apply a different logger in an initializer, like this:However that would then apply to all environments.
Can anyone advise what is the best way to assign a different logger per environment?
The text was updated successfully, but these errors were encountered: