Please help me in this matter
···
On 7/24/08, Prasad <saytoprasad@gmail.com> wrote:
Hi all,
I have following code in simple ruby file, this code is
recording messages in the log file with time and seveority.$log = Logger.new('logger.txt')
$log.level = Logger::DEBUG
$log.datetime_format = "%H:%M:%S"
$log.info("Watir Execution Starts")
$log.debug("Halllow Worled!")
$log.info("Achtung Achtung. The Train will leave from
platform 9")
$log.warn("no no no no no. you can't do this")
$log.error("error error Danger Danger")
$log.fatal("game over game over game over")I have placed above code in the class file as below. With this
change, this code is not recording time and seriority in the log
file, only messages are appearing.require "test/unit"
require 'Watir'
require 'logger'
include Watirclass PublishersFlow < Test::Unit::TestCase
def test_sample
$log = Logger.new('logger.txt')
$log.level = Logger::DEBUG
$log.datetime_format = "%H:%M:%S"
$log.info("Watir Execution Starts")
$log.debug("Halllow Worled!")
$log.info("Achtung Achtung. The Train will leave from
platform 9")
$log.warn("no no no no no. you can't do this")
$log.error("error error Danger Danger")
$log.fatal("game over game over game over")
end
end====================================================================
Does anybody help me in this case.
Prasad