From 4da62419288bd3f6f70875be1a822ca6b78afb6e Mon Sep 17 00:00:00 2001 From: Matthew Trew Date: Thu, 18 Jun 2026 14:46:12 +0200 Subject: [PATCH] Re-open Semantic Logger appenders in Cluster mode This missing config meant Semantic Logger was not working in prod, where we use Puma in Cluster mode. See https://logger.rocketjob.io/forking.html#puma --- config/puma.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/puma.rb b/config/puma.rb index 71f0f48ff..0f6ac3ebb 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -38,6 +38,11 @@ workers worker_count + before_worker_boot do + # Re-open appenders after forking the process + SemanticLogger.reopen + end + # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write @@ -48,3 +53,5 @@ # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart + +