Add the Ability to be Able to Configure the Logger
This PR allows Shoryuken to be able to configure the logger such as:
Shoryuken.logger = Appsignal::Logger.new('shoryuken')
Shoryuken.logger.formatter = Shoryuken::Logging::WithoutTimestamp.new
This provides some feature parity to Sidekiq and helps developers that are using a service like AppSignal get their logs up there.
https://docs.appsignal.com/logging/platforms/integrations/ruby.html#sidekiq-logger
Just passing by, however, I've been using a custom logger for years with no issue.
You can already configure the Shoryuken logger via the options field.
# disclaimer this is sudo code and untested...
require "logger"
class MyCustomLogger < Logger; end
custom_logger = MyCustomLogger.new("my_custom_logger")
Shoryuken.options[:logger] = custom_logger
Or in the config options hash you can pass in the custom_logger instance.
Shoryuken will now log via your custom logger where you can redefine your implementation.
@DanHenton I believe I began with that and wanted to take it further. I wasn't confident that Shoryuken would stick with the configuration that was set via the options. I wanted a first class option so that the logger never accidentally goes to the default log.
I also needed a log that would be compatible with AppSignal for usage.
@BenMorganMY @DanHenton I can no longer maintain this project. I updated the README with additional info https://github.com/ruby-shoryuken/shoryuken/commit/946ed1d9bb211c8b3b88cb911df48f9229ba8f45
@phstc Thanks for the update.
Appreciate all of your work on this project ❤️
This PR is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.
This PR was closed because it hasn't seen activity for a while.
RIP