I've worked around this and am using log4r which is working just fine for me
Thanks
Wadud
-Original Message-
From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
On Behalf Of Bret Pettichord
Sent: 25 March 2009 23:44
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: using a logger with watir loses formatting
Watir uses activesupport and i think this modifies the logger. Or maybe
its another gem that Watir uses. Not sure really, but i think it's
something like that.
Bret
Ruf, Wadud wrote:
Marekj,
You describe the exact same scenario as what I am experiencing. I've
still not found out why it's doing it. As it's not my core domain I
will look into using the Logging gem.
Thanks for the tip
Wadud
* From: * watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] *On Behalf Of *marekj
*Sent:* 24 March 2009 22:02
*To:* watir-general@googlegroups.com
*Subject:* [wtr-general] Re: using a logger with watir loses formatting
I've seen something similar when I moved my test machines from 1.5.3
to 1.6.2 gem. My custom logger has stopped generating timestamps and
severity and only outputted messages.
My custom Logger class methods were not executed. Logger class from
somewhere else was receiving my calls.
I've also moved to Logging gem as part of my move to 1.6.2 Watir and I
never figured out this problem.
P.S. Logging gem works great for me with Watir. I like the simple
appenders so I can output to different files and to stdout as well.
marekj
Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/
On Tue, Mar 24, 2009 at 12:29 PM, Ruf, Wadud wadud@capgemini.com
mailto:wadud@capgemini.com wrote:
Hi,
I am using a logger to log statements to a file when running watir
scripts. The logger has a format specified. However I am experiencing
irregular behaviour when I for example call
Watir::Simple#new_browser_at() where it loses the format and just
outputs the statement. All other statements after this seem to lose
the formatting too.
Example steps are
log = Logger.new(logfile.log)
log.debug(Starting my watir test) = [01-01-2009 10:23:23] [INFO] -
Starting my watir test # As expected
b = Watir::Simple.new()
log.debug(opening browser) = [01-01-2009 10:23:24] [INFO] -
opening browser # As expected
b.new_browser_at(http://google.com;) # browser takes a few seconds to
fire up.
log.debug(browser open at google.com http://google.com) =
browser open at google.com http://google.com # Loses formatting
from here onwards
My code wraps these calls up in other methods but not doing anything
else. Any ideas why the formatting is lost? It seems it happens when
it waits for the browser to fire up.
Thanks
Wadud
Capgemini is a trading name used by the Capgemini Group of companies
which includes Capgemini UK plc, a company registered in England and
Wales (number 943935) whose registered office is at No. 1 Forge End,
Woking, Surrey, GU21 6DB
This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient, you are not authorized to read, print, retain,
copy, disseminate, distribute, or use this message or any part
thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient, you are not authorized to read, print, retain,
copy, disseminate, distribute, or use this message or any part
thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
--
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord
Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the
intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any
part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this
message.
--~--~-~--~~~---~--~~
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