Skip to content

Commit f9e8686

Browse files
committed
Add log directory creation for background daemon
* Ensure the log directory for background daemon tasks is created at startup. * This change enhances logging capabilities by maintaining a dedicated log structure.
1 parent ed9dc89 commit f9e8686

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎script/background_daemon‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ file_logger.formatter = proc do |severity, datetime, progname, msg|
3333
end
3434

3535
Rails.logger = ActiveSupport::BroadcastLogger.new(stdout_logger, file_logger)
36+
FileUtils.mkdir_p(Rails.root.join('log', 'background_daemon'))
3637

3738
Rails.logger.auto_flushing = true if Rails.logger.respond_to? :auto_flushing=
3839
Rails.logger.info 'Starting background_daemon'

0 commit comments

Comments
 (0)