Skip to content

Commit d62a27d

Browse files
committed
Moving the Logger swap to before_app_loads, per Yehuda's recommendation
1 parent 7e916b4 commit d62a27d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

chef-server/lib/init.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
# disable the ActiveSupport json annoying stuff, as it breaks our to_json
7070
Merb.disable :json
7171

72+
Merb::BootLoader.before_app_loads do
73+
Chef::Log.logger = Merb.logger
74+
end
75+
7276
# ==== Dependencies
7377

7478
# These are some examples of how you might specify dependencies.
@@ -163,7 +167,6 @@
163167
c[:log_stream] = Chef::Config[:log_location]
164168
end
165169

166-
Chef::Log.logger = Merb.logger
167170
Chef::Log.info("Compiling routes... (totally normal to see 'Cannot find resource model')")
168171

169172
Merb::Router.prepare do |r|

0 commit comments

Comments
 (0)