Hi All,

I am using example_logger1.rb for logging in my watir ruby scripts.Now
I need to do 2 things.

1. Using example_logger1.rb,  log files (text) is saved in current
directory where ruby scripts resides. I need to save that in different
directory (say for example E:\tmp\logs).
- code in example_logger1.rb which define file is

class LoggerFactory

  def LoggerFactory.start_default_logger(fileNamePrefix)
    time = Time.now.strftime("%m %d %Y %H %M %s")
    logger = CoreLogger.new(File.join(File.dirname(__FILE__), "#
{fileNamePrefix}_#{time}.txt") ,2, 1000000)
    return logger
  end
end

2. If I run a script 2 times then it creates seperate log files again.
Is there any way to append new logs in already existing log file. I am
calling logger function in my script like that:

def start
    $ie = Watir::IE.new
    filePrefix = "test-log"
    #create a logger
    $logger = LoggerFactory.start_xml_logger(filePrefix)
    $ie.set_logger($logger)
  end

Can anyone please help me.

Thanks and Regards
Maumita

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to