Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 687 Bytes

README.md

File metadata and controls

46 lines (38 loc) · 687 Bytes

lager-logstash

Lager backend for sending logs to Logstash with udp support

Configuration

Add lager_logstash to your rebar.config deps.

And configure lager app with something like this:

[
 {lager,
  [
   {handlers,
    [
     {lager_logstash,
      [
       {type, backend},
       {level, info},
       {host, "localhost"},
       {port, 5000}]}
      ]}
    ]}
  ]}
].

Sample logstash config:

input {
  udp {
    host => "localhost"
    port => 5000
    type => "erlang"
  }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "logstash"
  }
}