Tesla Timber Logger Middleware
Tesla middleware for logging outgoing requests to Timber.io.
Using this middleware will log all requests and responses using Timber.io formatting and metadata.
Installation
Add tesla_timber_logger to your list of dependencies in mix.exs:
def deps do
[
{:tesla_timber_logger, "~> 0.1.0"}
]
endUsage
defmodule MyClient do
use Tesla
plug Tesla.Middleware.TimberLogger
endConfiguration
You can pass in an optional service_name to this middleware to tag all
outgoing http requests with the given name. This will be searchable in
Timber.io's dashboard.
plug Tesla.Middleware.TimberLogger, service_name: "my-service"The docs can be found at https://hexdocs.pm/tesla_timber_logger.