🌲 Timber integration for Phoenix
The Timber Phoenix library provides enhanced logging for your Phoenix-based application.
Installation
Ensure that you have both :timber
(version 3.0.0 or later) and :timber_phoenix
listed
as dependencies in mix.exs
:
def deps do
[
{:timber, "~> 3.0"},
{:timber_phoenix, "~> 1.0"}
]
end
Then run mix deps.get
.
You'll need to add a configuration line for every Phoenix endpoint. For example,
if you have the application :my_app
and the Phoenix endpoint MyApp.Endpoint
,
the configuration in config/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.
Notes for Umbrella Applications
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.
License
This project is licensed under the ISC License - see [LICENSE] for more details.