log_forwarder v0.1.0 LogForwader View Source
A simple LogForwarder backend which run as a supervisor to forward logs to another server.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Callback invoked to start the supervisor and during hot code upgrades
Send log
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Callback invoked to start the supervisor and during hot code upgrades.
Developers typically invoke Supervisor.init/2
at the end of their
init callback to return the proper supervision flags.
Callback implementation for Supervisor.init/1
.
Send log
Parameters:
Param | Description | Example |
---|---|---|
tag | Tag of log | API , Auth , … |
level | Log level | :info or :error |
data | Log data | %{user_id: 123, function_name: 'Client.sample_func', ... } |
Examples
iex> LogForwarder.send_log('API', :info, data)