logging - Resque log handling: what sort of strategy? -
i'm having issues resque logger. works when start command line (it flushes standard output). deamonize it, don't see log anymore. thought default rails app logger, nothing shows there. plus, i'm using library writes of output (mostly debugging purposes) standard error , standard output (namely, $stderr , $stdout). these constants flush resque logger (moreover, should they)? how bundle them together?
not that, wanted write log of forked process separate file, is, need change log file before process job. (which hook) best it?
question-1 :
i thought default rails app logger
answer 1:
nope resque logger default log stdout
have change log specific file.
question 2:
plus, i'm using library writes of output (mostly debugging purposes) standard error , standard output (namely, $stderr , $stdout).
answer 2:
nope, unless log there output resque.logger.[info|warn|error]
syntax
question 3:
not that, wanted write log of forked process separate file, is, need change log file before process job. (which hook) best it?
answer 3:
well think can have redefine resque.logger
in resque hook before_perform
def self.before_perform resque.logger = file.open(file.join("path")) end
and use resque.logger.[info | warn | error]
everywhere
hope help
Comments
Post a Comment