Sha256: 4a057be96307ab0655cc34eab078500a17ec56f1d82bfea81e3d767a787d46a1
Contents?: true
Size: 390 Bytes
Versions: 25
Compression:
Stored size: 390 Bytes
Contents
require "logger" module GLogger def initialize_logger log_file return unless log_file @logger = if log_file == "-" Logger.new($stdout) else Logger.new(log_file) end @logger.datetime_format = "%Y-%m-%d %H:%M:%S " end def log text @logger.info(text) if @logger end def log_error text @logger.error(text) if @logger end end
Version data entries
25 entries across 25 versions & 1 rubygems