logger_papertrail_backend v1.0.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 a parsable URI 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(configuration)
configure_papertrail_target(configuration :: list) :: %LoggerPapertrailBackend.Configuration{host: binary, port: integer, system_name: binary}
Configures target using a parsable URI 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.