class UmfLogger
Public Class Methods
logInfoMsg(msg)
click to toggle source
写入info类型日志到日志文件
# File lib/UmfLogger.rb, line 12 def UmfLogger.logInfoMsg(msg) if UmfConfig.umf_log_switch filePath = UmfConfig.umf_log_path + "-" + Time.new.strftime("%Y-%m-%d") + ".txt" #msgHead = Time.new.strftime("%Y-%m-%d %H:%M:%S") + " " #msg = msgHead + msg file = File.open(filePath, File::APPEND | File::CREAT | File::WRONLY) logger = Logger.new(file) logger.info(msg) end end