I've started a new project with Sidekiq behind ActiveJob.
When I fire up Sidekiq locally using bundle exec sidekiq, I understand that the deafult logging behavior is to log to STDOUT, and sure enough, the Sidekiq logs start to show up
2015-02-14T22:20:24.404Z 28652 TID-ouxhmc8vs INFO: Running in ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
2015-02-14T22:20:24.404Z 28652 TID-ouxhmc8vs INFO: See LICENSE and the LGPL-3.0 for licensing details.
2015-02-14T22:20:24.404Z 28652 TID-ouxhmc8vs INFO: Upgrade to Sidekiq Pro for more features and support:
http://sidekiq.org/pro2015-02-14T22:20:24.404Z 28652 TID-ouxhmc8vs INFO: Starting processing, hit Ctrl-C to stop
2015-02-14T22:20:24.450Z 28652 TID-ouxi4a268 INFO: Booting Sidekiq 3.3.2 with redis options {}
2015-02-14T22:20:24.450Z 28652 TID-ouxijme6o INFO: Booting Sidekiq 3.3.2 with redis options {}
2015-02-14T22:20:31.883Z 28652 TID-ouxhpmwm0 ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper JID-d39b0f7b48359dce3cda5294 INFO: start
2015-02-14T22:20:32.388Z 28652 TID-ouxhpmwm0 ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper JID-d39b0f7b48359dce3cda5294 INFO: done: 0.505 sec
But, for any direct logger calls, as the wiki page on logging[1] indicates, there is no output. However, the log
statements show up in development.log. Similarly, the Sidekiq logs that
show up on the terminal, do not appear in the development.log file.
class SomeJob < ActiveJob::Base
queue_as :default
def perform(*args)
logger.info "SomeJob starting"
end
end
I know it's a small thing to sync up the logs when developing locally, but does help streamline debugging, but is there a config to do so? To get logger.level calls inside an ActiveJob wrapped Sidekiq job logging to the terminal?
[1]
https://github.com/mperham/sidekiq/wiki/Logging