Class: Util::HtmlLogger
Overview
Handling HTML log.
Instance Method Summary collapse
-
#initialize(pPath = "/tmp/kuniri_log.html") ⇒ HtmlLogger
constructor
A new instance of HtmlLogger.
-
#write_log(pMessage) ⇒ Object
documentation.
Constructor Details
#initialize(pPath = "/tmp/kuniri_log.html") ⇒ HtmlLogger
Returns a new instance of HtmlLogger.
11 12 13 14 |
# File 'lib/kuniri/util/html_logger.rb', line 11 def initialize(pPath = "/tmp/kuniri_log.html") super(pPath) initialize_html_file end |
Instance Method Details
#write_log(pMessage) ⇒ Object
documentation.
18 19 20 21 22 23 24 |
# File 'lib/kuniri/util/html_logger.rb', line 18 def write_log(pMessage) File.open(@log_path, 'a') do |file| file.write("<hr>\n") file.write("<p>" + Time.now.strftime("%d/%m/%Y %H:%M:%S") + "</p>\n") file.write("\t<i>#{pMessage}</i>\n") end end |