Sha256: cb59d484f44a4ae351793a71c8ef15434efc044a6a0436f6db8ca696ee91dfe0
Contents?: true
Size: 811 Bytes
Versions: 66
Compression:
Stored size: 811 Bytes
Contents
require 'ansi/code' require 'logging' module Nutella class NutellaLogger def initialize(name) @log = Logging.logger[name] @log.add_appenders(Logging.appenders.stdout( :layout => Logging.layouts.pattern(:pattern => '%m\n') ) ) end def debug(message, code=nil) @log.debug(ANSI.cyan + message + ANSI.reset) code end def info(message, code=nil) @log.info(message) code end def success(message, code=nil) @log.info(ANSI.green + message + ANSI.reset) code end def warn(message, code=nil) @log.warn(ANSI.yellow + message + ANSI.reset) code end def error(message, code=nil) @log.error(ANSI.red + message + ANSI.reset) code end end end
Version data entries
66 entries across 66 versions & 1 rubygems