logger_sentry v0.1.1 Logger.Backends.Sentry
This module is the sentry backend for Logger and use LoggerBackends behaviour.
It defines all callbacks of LoggerBackends
behaviour:
- init/1
- log_event/4
the function init/1
will initital configure for the sentry backend, and
function log_event/4
will send the output to sentry server depends on
the configure information of sentry
application.
Link to this section Summary
Functions
Get the backend log format
Initial for Logger backend
Get the backend log level
Set the backend log level
Invoked to log the event message as needed
Get the backend log metadata
Set the backend log metadata
Link to this section Functions
Get the backend log format.
Initial for Logger backend.
args
is the module name which using the LoggerBackends behaviour, as example
above in Logger.Backends.File
module, the _args
in init/1
is
Logger.Backends.File
.
Returning {:ok, state}
will cause the Logger backend to enter its loop and
wait for log event message.
Callback implementation for LoggerBackends.init/1
.
Get the backend log level.
Set the backend log level.
Invoked to log the event message as needed.
output
is the argument after parse of format_event
in the LoggerBackends
module.
Returning new_state
continues the loop with new state new_state
.
Callback implementation for LoggerBackends.log_event/4
.
Get the backend log metadata.
Set the backend log metadata.