Rails.logger migration from Logging plugin to Instrumentation

10 views
Skip to first unread message

co...@csuhta.com

unread,
Aug 2, 2019, 7:06:27 PM8/2/19
to Shrine
I am currently doing this in Shrine, which is now deprecated:

Shrine.plugin :logging, logger: Rails.logger

It's unclear from the docs how I can migrate to the Instrumentation plugin and mostly keep this same behavior. I want to continue using the console logger, I don't have a fancier event capture platform right now. Is there a simple way to keep using the Rails logger?

Janko Marohnić

unread,
Aug 2, 2019, 7:20:45 PM8/2/19
to Shrine, co...@csuhta.com
Yes, Shrine now uses a `Shrine.logger` (which includes the instrumentation plugin), so you can do

  Shrine.logger = Rails.logger

Kind regards,
Janko
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/b80f870d-31d4-4f3f-80c8-c94e2d04d80c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages