Skip to content

Commit

Permalink
Default to using Elixir Logger (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryseed authored Dec 17, 2024
1 parent 286004f commit d84ad55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/new_relic/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ defmodule NewRelic.Config do
This controls how the Agent logs it's own behavior, and doesn't impact your
applications own logging at all.
Defaults to the File `"tmp/new_relic.log"`.
Defaults to using `Logger`.
Options:
- `"Logger"` Send Agent logs to Elixir's `Logger`
- `"tmp"` Write to `tmp/new_relic.log`
- `"stdout"` Write directly to Standard Out
- `"Logger"` Send Agent logs to Elixir's Logger
- `"file_name.log"` Write to a chosen file
Agent logging can be configured in two ways:
Expand Down
3 changes: 2 additions & 1 deletion lib/new_relic/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ defmodule NewRelic.Logger do

def initial_logger do
case NewRelic.Config.logger() do
nil -> {:file, "tmp/new_relic.log"}
nil -> :logger
"file" -> {:file, "tmp/new_relic.log"}
"stdout" -> :stdio
"memory" -> :memory
"Logger" -> :logger
Expand Down

0 comments on commit d84ad55

Please sign in to comment.