From: Prasad OVLN Date: 2008-07-24T18:52:40+09:00 Subject: Re: Missing time and seviority in the log file ------=_Part_91672_1114924.1216893413618 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Please help me in this matter On 7/24/08, Prasad 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 Watir > > class 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 > ------=_Part_91672_1114924.1216893413618--