logging - Rails change logger level for a specific job -
i need debug job on production data. have enhanced activejobs support dry_run mode, , i'd temporarily change logger level :debug
for specific job execution
i calling in console
myjob.perform_later(dry_run: true, log_level: 'debug')
i instanciating logger class variable during job initialization
@logger = rails.logger , return if logger.blank?
how can either switch rails logger (just job) or maybe copy current rails logger , change log level ?
Comments
Post a Comment