Skip to content

Commit

Permalink
PoC
Browse files Browse the repository at this point in the history
  • Loading branch information
karloscodes committed Oct 30, 2020
1 parent 61c6213 commit 6cfd722
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/puma/launcher.rb
Expand Up @@ -87,6 +87,8 @@ def initialize(conf, launcher_args={})
Puma.stats_object = @runner

@status = :run

log_config if ENV['LOG_CONFIG']
end

attr_reader :binder, :events, :config, :options, :restart_dir
Expand Down Expand Up @@ -521,5 +523,21 @@ def with_unbundled_env
Bundler.with_unbundled_env { yield }
end
end

def log_config
log "Configuration:"

@config.options.default_options
.merge(@config.options.file_options)
.merge(@config.options.user_options)
.each { |config_key, value| log "-#{config_key}: #{value}" }

if @config.plugins.instances.size > 0
log "\nLoaded plugins:"
log @config.plugins.instances
end

log "\n"
end
end
end
2 changes: 2 additions & 0 deletions lib/puma/plugin.rb
Expand Up @@ -4,6 +4,8 @@ module Puma
class UnknownPlugin < RuntimeError; end

class PluginLoader
attr_reader :instances

def initialize
@instances = []
end
Expand Down

0 comments on commit 6cfd722

Please sign in to comment.