Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change agent unavailable to debug #2975

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/new_relic/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/new_relic/agent_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading