Skip to content

fluent/fluent-logger-erlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fluent-logger-erlang

Build Status

erlang logger using gen_event to output to fluent.

Examples

1> {ok,_Pid} = gen_event:start({local, yourlogger}),
2> ok = gen_event:add_handler(yourlogger, fluent_event, myapp),

eep18

3> ok = gen_event:notify(yourlogger, {access, {[{<<"agent">>,<<"foo">>}]}}),
% 2013-12-17 22:55:43 +0900 myapp.access: {"agent":"foo"}

proplist

4> ok = gen_event:notify(yourlogger, {access, [{<<"agent">>,<<"foo">>}]}),
% 2013-12-17 22:55:53 +0900 myapp.access: {"agent":"foo"}

with Lager

In app.config or sys.config:

{lager, [
  {handlers, [
     {fluent_event, {yourappname, hostname, 24224}}
]}]},

About

A structured logger for Fluentd (Erlang)

Resources

Stars

Watchers

Forks

Packages

No packages published