-
Attach the new logger through telemetry events in your project's
application.ex
file:# lib/pixie/application.ex def start(_type, _args) do children = [ # ... ] # # Add the line below: # :ok = Logster.attach_phoenix_logger() opts = [strategy: :one_for_one, name: MyApp.Supervisor] Supervisor.start_link(children, opts) end
-
Locate the line installing
Logster.Plugs.Logger
in yourendpoint.ex
file.plug Logster.Plugs.Logger, # Configuration options such as those below might not be present formatter: Logster.Plugs.JSONFormatter, allowed_headers: ["content-type"], excludes: [:params]
-
If configuration options were passed to
Logster.Plugs.Logger
, move them toconfig.exs
:config :logster, formatter: :json, headers: ["content-type"], excludes: [:params]
NOTE:
allowed_headers
option has been renamed toheaders
-
Remove the line installing
Logster.Plugs.Logger
from yourendpoint.ex
file. -
Locate any calls to
Logster.Plugs.ChangeLogLevel
and rename it toLogster.ChangeLogLevel
-
Add the following to
config.exs
to disable the default Phoenix logger:config :phoenix, :logger, false
-
Move any configuration options passed to
Logster.Plugs.Logger
toconfig.exs
(See above section for more information). -
Locate any calls to
Logster.Plugs.Logger
and rename it toLogster.Plug
-
Locate any calls to
Logster.Plugs.ChangeLogLevel
and rename it toLogster.ChangeLogLevel