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

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)

Can anyone please help me.

Thanks and Regards

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: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to