Refactor logging across controllers and jobs to use a centralized log method; improve consistency and readability of log messages

This commit is contained in:
2026-02-27 22:32:07 -05:00
parent f32b48296d
commit 9c0f153518
10 changed files with 107 additions and 31 deletions

View File

@@ -16,7 +16,7 @@ class Qbo < ActiveRecord::Base
# Updates last sync time stamp
def self.update_time_stamp
date = DateTime.now
logger.info "Updating QBO timestamp to #{date}"
log "Updating QBO timestamp to #{date}"
qbo = Qbo.first
qbo.last_sync = date
qbo.save
@@ -25,4 +25,11 @@ class Qbo < ActiveRecord::Base
def self.last_sync
format_time(Qbo.first.last_sync)
end
private
def self.log(msg)
logger.info "[QBO] #{msg}"
end
end