diff --git a/lib/new_relic/agent.rb b/lib/new_relic/agent.rb index 888ce963ba..6bbdc4d58e 100644 --- a/lib/new_relic/agent.rb +++ b/lib/new_relic/agent.rb @@ -132,8 +132,8 @@ class SerializationError < StandardError; end def agent # :nodoc: return @agent if @agent - NewRelic::Agent.logger.warn("Agent unavailable as it hasn't been started.") - NewRelic::Agent.logger.warn(caller.join("\n")) + NewRelic::Agent.logger.debug("Agent unavailable as it hasn't been started.") + NewRelic::Agent.logger.debug(caller.join("\n")) nil end diff --git a/test/new_relic/agent_test.rb b/test/new_relic/agent_test.rb index 3bf5281dfa..adf6187f9a 100644 --- a/test/new_relic/agent_test.rb +++ b/test/new_relic/agent_test.rb @@ -123,9 +123,9 @@ def test_manual_start_kicks_dependency_check_again NewRelic::Agent.shutdown end - def test_agent_logs_warning_when_not_started + def test_agent_logs_debug_when_not_started with_unstarted_agent do - expects_logging(:warn, includes("hasn't been started")) + expects_logging(:debug, includes("hasn't been started")) NewRelic::Agent.agent end end