Files
infinsweeper/logman.rb

12 lines
289 B
Ruby

# module for logging
module Logman
def self.log(log)
file, line = caller(1, 1)[0].split(":")
File.write("log/main.log", "[#{Time.now}] {#{file}:#{line}} #{log}\n", mode: "a")
end
def self.imp(log)
File.write("log/imp.log", "[#{Time.now}] #{log}\n", mode: "a")
end
end