Lager backend for sending logs to Logstash with udp support
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"
}
}