logger_papertrail_backend v0.2.0 LoggerPapertrailBackend.Configurator

You can config papertrail backend with an url in the form of papertrail://logs.papertrail.com:12345/my_system_name It works with syslog:// as scheme too.

In your config, choose between

  config :logger, :logger_papertrail_backend,
    url: "papertrail://logs.papertrail.com:12345/my_system_name"

or

  config :logger, :logger_papertrail_backend,
    host: "logs.papertrailapp.com:12345",
    system_name: my_system_name

Example

iex> config = [url: "papertrail://logs.papertrail.com:12345/my_system_name"]
iex> LoggerPapertrailBackend.Configurator.configure_papertrail_target(config)
%LoggerPapertrailBackend.Configuration{host: "logs.papertrail.com", port: 12345, system_name: "my_system_name"}

iex> host_config = [host: "logs.papertrail.com:12345", system_name: "my_system_name"]
iex> LoggerPapertrailBackend.Configurator.configure_papertrail_target(host_config)
%LoggerPapertrailBackend.Configuration{host: "logs.papertrail.com", port: 12345, system_name: "my_system_name"}

Summary

Functions

Configures target using syslog:// or papertrail:// - scheme as url, or or configures target by extracting system-name, host and port from a keywordlist in the form of [host: "hostname:port", system_name: "my_system_name"]. system_name is optional

Functions

configure_papertrail_target(config)
configure_papertrail_target([{:url, binary}]) :: %LoggerPapertrailBackend.Configuration{host: binary, port: integer, system_name: binary}
configure_papertrail_target([{:url, binary}]) :: %LoggerPapertrailBackend.Configuration{host: binary, port: integer, system_name: binary}
configure_papertrail_target([host: binary, system_name: binary]) :: %LoggerPapertrailBackend.Configuration{host: binary, port: integer, system_name: binary}
configure_papertrail_target([{:host, binary}]) :: %LoggerPapertrailBackend.Configuration{host: binary, port: integer, system_name: binary}

Configures target using syslog:// or papertrail:// - scheme as url, or or configures target by extracting system-name, host and port from a keywordlist in the form of [host: "hostname:port", system_name: "my_system_name"]. system_name is optional.