You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application that me and my team working on use Ruby on Rails hosted in Openshift pod. We use delayed_job to handle background process, and for delayed_job logging, the application write the log into log/delayed_job.log file. However, if a new pod for the application is created, the pod will create a new file. Also, the company is using Kibana to save every log from Openshift pod.
What we tried so far is put this code in delayed_job_config.rb
Delayed::Worker.logger = Logger.new(STDERR)
To write the log for another process beside delayed job, in order to write the log in Openshift pod log, we use this following code, e.g: Rails.logger.info "Result: #{ldap.get_operation_result.code}"
However, the delayed_job log is not still appear in Logs tab of the pod (in order for the log to appear in Kibana)
The goal is to write the log in Logs tab of the Openshift pod.
Here's the screenshoot of Logs in Openshift pod :
Ruby version : 2.7.1p83
Rails version : 6.0.4.1
UPDATE :
We tried to put Delayed::Worker.logger = Rails.logger in delayed_job_config.rb but still did not work
The text was updated successfully, but these errors were encountered:
The application that me and my team working on use Ruby on Rails hosted in Openshift pod. We use delayed_job to handle background process, and for delayed_job logging, the application write the log into log/delayed_job.log file. However, if a new pod for the application is created, the pod will create a new file. Also, the company is using Kibana to save every log from Openshift pod.
What we tried so far is put this code in delayed_job_config.rb
Delayed::Worker.logger = Logger.new(STDERR)
To write the log for another process beside delayed job, in order to write the log in Openshift pod log, we use this following code, e.g:
Rails.logger.info "Result: #{ldap.get_operation_result.code}"
However, the delayed_job log is not still appear in Logs tab of the pod (in order for the log to appear in Kibana)
The goal is to write the log in Logs tab of the Openshift pod.
Here's the screenshoot of Logs in Openshift pod :
Ruby version : 2.7.1p83
Rails version : 6.0.4.1
UPDATE :
We tried to put
Delayed::Worker.logger = Rails.logger
indelayed_job_config.rb
but still did not workThe text was updated successfully, but these errors were encountered: