Skip to content
A simple LogForwarder backend running as a supervisor which forwards logs to another endpoint.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.formatter.exs
.gitignore
LICENSE.txt
README.md
mix.exs
mix.lock

README.md

LogForwarder

A simple LogForwarder backend as a supervisor which forwards logs to another server.

Installation

def deps do
  [
    {:log_forwarder, "~> 0.2.2"}
  ]
end

Configuration

Our config.exs would have an entry similar to this:

config :log_forwarder, config:
    host: "localhost",
    port: 24224,
    prefix: "LogForwarder",
    retry_times: 10,
    attributes: ~w(level error ...)

LogForwarder supports the following configuration values:

  • host
  • port
  • prefix
  • retry_times
  • attributes

How to use

defmodule SampleModule do
    import LogForwarder

    def sample_func() do
        # do something ...
        send_log("api_tag", :info, data)
    end
end

Todo

  • Add unit test
You can’t perform that action at this time.