Created logger

This commit is contained in:
Sdogruyol 2015-10-27 21:01:36 +02:00
parent 3c4619e040
commit be58e009af
2 changed files with 24 additions and 0 deletions

11
src/kemal/logger.cr Normal file
View file

@ -0,0 +1,11 @@
class Kemal::Logger
LOG_LEVELS = %w(info debug error warn)
def initialize(@stream)
end
{% for method in LOG_LEVELS %}
def {{method.id}}(message)
@stream.puts message
end
{% end %}
end