Sha256: 39ddaa3744742f4653f1d5f72d625e4bc12d81ad8ba7ba1c22e3e16d53d492d6
Contents?: true
Size: 570 Bytes
Versions: 7
Compression:
Stored size: 570 Bytes
Contents
require 'logger' module NeuroHmmerApp 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
7 entries across 7 versions & 1 rubygems