logger_sentry v0.2.0 Logger.Backends.Sentry

This module is the sentry backend for Logger and it can handle the event message from the Logger event server and push the log message to the sentry dashboard. This module have a set of interface functions:

  • get/set the log level
  • get/set the log metadata

Config

config example:

config :logger,
  backends: [:console, Logger.Backends.File],
  sentry: [level: :error,
           metadata: []
          ]

We set the Applicaton configure of logger, and add it to backends list, the set log level as needed. So we could execute Logger interface functions as usas, and the sentry backend will push log message to the sentry dashboard.

Link to this section Summary

Functions

Get the backend log level

Set the backend log level

Get the backend log metadata

Set the backend log metadata

Link to this section Functions

Link to this function level()
level() :: :debug | :info | :warn | :error

Get the backend log level.

Link to this function level(level)
level(:debug | :info | :warn | :error) :: :ok | :error_level

Set the backend log level.

Link to this function metadata()
metadata() :: :all | list()

Get the backend log metadata.

Link to this function metadata(metadata)
metadata(:all | list()) :: :error_metadata | :ok

Set the backend log metadata.