Sha256: c9e203bc3d09d2bee2da56d40cf97728e8d2bc58eb9fafc927396af35a0f44e0
Contents?: true
Size: 316 Bytes
Versions: 1
Compression:
Stored size: 316 Bytes
Contents
require 'logger' module Minimo class Logger def initialize(dir, level = ::Logger::INFO) @dir, @level = dir, level end def write(msg) logger = ::Logger.new(File.new("#{@dir}/minimo.log", 'a+'), 'daily') logger.level = @level logger.info msg logger.close end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
minimo-0.0.1 | lib/minimo/logger.rb |