public
Created

wrapper for basho's lager in Elixir

  • Download Gist
Lager.ex
Elixir
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
defmodule Lager do
 
# debug | info | notice | warning | error | critical | alert | emergency
 
def debug msg do
Lager.log(:debug,msg)
end
 
def info msg do
Lager.log(:info,msg)
end
 
def notice msg do
Lager.log(:notice,msg)
end
 
def warning msg do
Lager.log(:warning,msg)
end
 
def error msg do
Lager.log(:error,msg)
end
 
def critical msg do
Lager.log(:critical,msg)
end
 
def alert msg do
Lager.log(:alert,msg)
end
 
def emergency msg do
Lager.log(:emergency,msg)
end
 
def log(level,msg) do
:lager.log(level,Process.self(),msg)
end
 
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.