The Timber Phoenix library provides enhanced logging for your Phoenix-based application.
-
Ensure that you have both
:timber
(version 3.0.0 or later) and:timber_phoenix
listed as dependencies inmix.exs
:def deps do [ {:timber, "~> 3.0"}, {:timber_phoenix, "~> 1.0"} ] end
-
Run
mix deps.get
to get the dependencies. -
You'll need to add a configuration line for every Phoenix endpoint. For example, if you have the application
:my_app
and the Phoenix endpointMyApp.Endpoint
, the configuration inconfig/config.exs
would look like this:use Mix.Config config :my_app, MyApp.Endpoint, # ..., instrumenters: [Timber.Phoenix],
For more information, see the documentation for the Timber.Phoenix module.
When integrating Timber with Phoenix for an umbrella application, the
:timber_phoenix
library needs to be a dependency for every application that
defines an Phoenix endpoint.
This project is licensed under the ISC License - see [LICENSE] for more details.