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
Lumberjack claims that it "can be a drop in replacement for Logger or ActiveSupport::BufferedLogger" -- but it doesn't give any instructions on how to use it as a drop-in replacement in Rails!
I finally figured it out (I think), but I would suggest adding some examples and instructions...
Under "Pluggable Devices", it lists a bunch of devices (such as Lumberjack::Device::SizeRollingLogFile) but doesn't actually tell you _how_ to instruct Lumberjack to use a different device other than the default. Perhaps add something like:
When you simply specify a file name, the default device that will be used is ____. To use a different device, just pass an instance of the device to Lumberjack.new, like this:
Perhaps you could add that as an example to your Readme as an example of using it with TaggedLogging?
Here's an example of the output produced with this configuration...
Started GET "/test/logging" for 127.0.0.1 at 2012-06-05 16:25:15 -0700
I [dfa3ef2503ce27958205f3254552c6bf] Processing by TestController#logging as HTML
I [dfa3ef2503ce27958205f3254552c6bf] ... Rails.app.config.log_level=:debug
D [dfa3ef2503ce27958205f3254552c6bf] ... debug message
I [dfa3ef2503ce27958205f3254552c6bf] ... info message
W [dfa3ef2503ce27958205f3254552c6bf] ... warn message
E [dfa3ef2503ce27958205f3254552c6bf] ... error message
I [dfa3ef2503ce27958205f3254552c6bf] Rendered text template (0.0ms)
I [dfa3ef2503ce27958205f3254552c6bf] Completed 200 OK in 184ms (Views: 183.3ms | ActiveRecord: 0.0ms)
Is there a way to configure my logger with Lumberjack so that it actually uses the value of config.log_level from your app's config/environments/{env}.rb file? The problem is, if I set config.logger in config/application.rb, that is beforeconfig/environments/{env}.rb has been loaded... But it works when using the default Rails logger so I assume it must be possible...
I really like Lumberjack so far -- especially like how modular it is. Keep up the good work!
The text was updated successfully, but these errors were encountered:
Lumberjack claims that it "can be a drop in replacement for Logger or ActiveSupport::BufferedLogger" -- but it doesn't give any instructions on how to use it as a drop-in replacement in Rails!
I finally figured it out (I think), but I would suggest adding some examples and instructions...
Under "Pluggable Devices", it lists a bunch of devices (such as Lumberjack::Device::SizeRollingLogFile) but doesn't actually tell you _how_ to instruct Lumberjack to use a different device other than the default. Perhaps add something like:
Some questions to consider when integrating Lumberjack into a Rails app...
config.log_level = :debug
setting? (Apparently no...)I think I finally figured out the answers to these questions...
This is what I ended up using in my config/application.rb:
Perhaps you could add that as an example to your Readme as an example of using it with TaggedLogging?
Here's an example of the output produced with this configuration...
Questions I still have:
buffer_size
is greater than 0?config.log_level
from your app'sconfig/environments/{env}.rb
file? The problem is, if I setconfig.logger
inconfig/application.rb
, that is beforeconfig/environments/{env}.rb
has been loaded... But it works when using the default Rails logger so I assume it must be possible...I really like Lumberjack so far -- especially like how modular it is. Keep up the good work!
The text was updated successfully, but these errors were encountered: