Skip to content

Commit

Permalink
Improve the default logger
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Jun 30, 2023
1 parent 0efdfcf commit 3aaacaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pitchfork/configurator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ class Configurator
}

# Default settings for Pitchfork
default_logger = Logger.new($stderr)
default_logger.formatter = Logger::Formatter.new
default_logger.progname = "[Pitchfork]"

DEFAULTS = {
:soft_timeout => 20,
:cleanup_timeout => 2,
:timeout => 22,
:logger => Logger.new($stderr),
:logger => default_logger,
:worker_processes => 1,
:after_worker_fork => lambda { |server, worker|
server.logger.info("worker=#{worker.nr} gen=#{worker.generation} pid=#{$$} spawned")
Expand Down

0 comments on commit 3aaacaf

Please sign in to comment.