Skip to content

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

License

Notifications You must be signed in to change notification settings

g-viet/log_forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages