Closed artemave closed 3 years ago
In the documentation, when running Puma in clustered mode, add the following to config/puma.rb
on_worker_boot do
ApplicationRecord.establish_connection if defined?(ActiveRecord)
# Re-open appenders after forking the process
SemanticLogger.reopen
end
If running in a forked environment, such as parallel test you could just disable the use of the background thread for logging by calling: SemanticLogger.sync!
before starting Rails or performing any other logging.
SemanticLogger.sync!
did the trick - thanks!
Environment
2.6.6p146
6.1.3
4.7.4
4.5.1
Puma: 5.3.1 Minitest: 5.14.4
Just requiring a gem. Plus
conig.log_level = :debug
.Expected Behavior
Observing logs in
log/test.log
Actual Behavior
I can only see these three lines when I run any test: