mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Merge pull request #1257 from namusyaka/fix-1142
avoid logging to stderr when loading config files
This commit is contained in:
commit
a97dc36dc0
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ module Sinatra
|
|||
paths.each do |pattern|
|
||||
Dir.glob(pattern) do |file|
|
||||
raise UnsupportedConfigType unless ['.yml', '.erb'].include?(File.extname(file))
|
||||
$stderr.puts "loading config file '#{file}'" if logging?
|
||||
logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger)
|
||||
document = ERB.new(IO.read(file)).result
|
||||
yaml = config_for_env(YAML.load(document)) || {}
|
||||
yaml.each_pair do |key, value|
|
||||
|
|
Loading…
Reference in a new issue