View Source LoggerHTTP.Adapter.Req (logger_http v0.1.0)

An HTTP adapter for LoggerHTTP that uses the :req library to send logs, and outputs errors to :stderr by default, or any device.

Usage

This adapter needs the :req library to be part of your dependencies. Add it to your mix.exs file if it is not already.

defp deps do
  [
    ...
    {:req, "~> 0.5"}
  ]
end

Configuration

This adapter supports the following configuration options:

  • :method (atom/0) - The HTTP method to use to send logs. The default value is :post.

  • :separator (term/0) - The separator to interleave logs with. Can be any iodata value. The default value is 10.

  • :error_device - The device to output errors to. The default value is :stderr.