Skip to content

Commit

Permalink
Don't assume control.log is intialized just because control is
Browse files Browse the repository at this point in the history
On truly concurrent rubies like jruby this isn't a safe assumption.
  • Loading branch information
Sam Goldstein committed May 18, 2012
1 parent 1d43732 commit b88eba0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/new_relic/agent.rb
Expand Up @@ -156,7 +156,7 @@ def get_stats(metric_name, use_scope=false)
# a standard output logger is returned.
def logger
control = NewRelic::Control.instance(false)
if control
if control && control.log
control.log
else
require 'logger'
Expand Down

0 comments on commit b88eba0

Please sign in to comment.