Timber v1.1.9 Timber.Config
Summary
Functions
Your Timber application API key. This can be obtained after you create your application in https://app.timber.io
Change the name of the Logger
metadata key that Timber uses for events.
By default, this is :event
Configuration for the :body
size limit in the Timber.Events.HTTP*
events.
Bodies that exceed this limit will be truncated to this limit
Custom HTTP client to use for transmitting logs over HTTP. Timber comes packaged with a
:hackney
client. See Timber.Transports.HTTP.HackneyClient
. If you do not want to use
:hackney
you can easily write your own client to handle log transport
Alternate URL for delivering logs. This is helpful if you want to use a proxy, for example
Specify a different JSON encoder function. Timber uses Poison
by default
Specify the log level that phoenix log lines write to. Such as template renders
Gets the transport specificed in the :timber configuration. The default is
Timber.Transports.IODevice
Functions
Your Timber application API key. This can be obtained after you create your application in https://app.timber.io
Example
config :timber, :api_key, "abcd1234"
Change the name of the Logger
metadata key that Timber uses for events.
By default, this is :event
Example
config :timber, :event_key, :timber_event
Logger.info("test", timber_event: my_event)
Configuration for the :body
size limit in the Timber.Events.HTTP*
events.
Bodies that exceed this limit will be truncated to this limit.
Please take care with this value, increasing it too high can mean very large payloads and very high outgoing network activity.
Example
config :timber, :http_body_size_limit, 5000
Custom HTTP client to use for transmitting logs over HTTP. Timber comes packaged with a
:hackney
client. See Timber.Transports.HTTP.HackneyClient
. If you do not want to use
:hackney
you can easily write your own client to handle log transport.
Example
config :timber, :http_client, MyCustomHTTPClient
Alternate URL for delivering logs. This is helpful if you want to use a proxy, for example.
Example
config :timber, :http_url, "https://123.123.123.123"
Specify a different JSON encoder function. Timber uses Poison
by default.
Example
config :timber, :json_encoder, fn map -> encode(map) end
Specify the log level that phoenix log lines write to. Such as template renders.
Example
config :timber, :instrumentation_level, :info
Gets the transport specificed in the :timber configuration. The default is
Timber.Transports.IODevice
.