Sha256: 28bf421bb3966455532ea156821040df16a1b510bf1de8e30a666f693ef2efc8
Contents?: true
Size: 573 Bytes
Versions: 12
Compression:
Stored size: 573 Bytes
Contents
require 'logger' module GeneValidatorApp class Logger < Logger def initialize(dev, verbose = false) super dev self.level = verbose ? DEBUG : INFO self.formatter = Formatter.new end # We change Logging format so that it is consistent with Sinatra's class Formatter < Formatter Format = "[%s] %s %s\n" def initialize self.datetime_format = '%Y-%m-%d %H:%M:%S' end def call(severity, time, _progname, msg) Format % [format_datetime(time), severity, msg2str(msg)] end end end end
Version data entries
12 entries across 12 versions & 1 rubygems