mirror of
https://github.com/plashchynski/crono.git
synced 2026-01-14 14:23:27 +01:00
Can't get logging to work. #48
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @minimul on GitHub (Aug 11, 2017).
I am running a rake task within
config/cronotab.rbe.g.Within the rake task I have both
Rails.loggerandpcommandsIf I run the task via command line
bin/rake quickbooks:renew_oauth2_tokenI see the output in the console and in thelog/development.log.I am running crono as a daemon but none of my logger output shows up in
log/crono.lognorlog/development.log.This is all that is recorded in
log/crono.log@minimul commented on GitHub (Aug 12, 2017):
Solution: Use
Crono.logger.(info|warn|error)instead ofRails.logger.*@firrib commented on GitHub (Aug 31, 2020):
To limit/control the output to the log file, in the
performfunction, I used:Crono.logger.level=:warn, using the appropriate log level defined in section 2.2 of https://guides.rubyonrails.org/debugging_rails_applications.html.The Crono::Logging is a standard Ruby logging wrapper. If there is a better place to put this code (or even this reply), then please let me know. Thanks for documenting this,
minimul, and for this gem,plashchynski. It's very helpful.