View Source Upgrade Guide
v1.x to v2.0.0
Phoenix users:
Attach the new logger through telemetry events in your project's
application.exfile:# 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) endLocate the line installing
Logster.Plugs.Loggerin yourendpoint.exfile.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_headersoption has been renamed toheadersRemove the line installing
Logster.Plugs.Loggerfrom yourendpoint.exfile.Locate any calls to
Logster.Plugs.ChangeLogLeveland rename it toLogster.ChangeLogLevelAdd the following to
config.exsto disable the default Phoenix logger:config :phoenix, :logger, false
Plug users:
Move any configuration options passed to
Logster.Plugs.Loggertoconfig.exs(See above section for more information).Locate any calls to
Logster.Plugs.Loggerand rename it toLogster.PlugLocate any calls to
Logster.Plugs.ChangeLogLeveland rename it toLogster.ChangeLogLevel