Share
Go down
snehal mulay
Posts : 4
Join date : 2011-03-18

How to write logs>

on Mon Mar 21, 2011 8:19 pm
Hi all,

I am using selenium rc. i want to write logs which we get in IDE like [INFO] and [ERROR]..how can i write this. How can I get error string?

-Snehal
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: How to write logs>

on Tue Mar 22, 2011 8:26 pm
hi,

Try to use the following command

storeLogMessages ( variableName )

Return the contents of the log.

This is a placeholder intended to make the code generator make this API available to clients. The selenium server will intercept this call, however, and return its recordkeeping of log messages since the last call to this API. Thus this code in JavaScript will never be called.

The reason I opted for a servercentric solution is to be able to support multiple frames served from different domains, which would break a centralized JavaScript logging mechanism under some conditions.

Returns:
all log messages seen since the last call to this API

I think this will solve the purpose. Best of luck.
auto_ashish1
Active particpant
Active particpant
Posts : 21
Join date : 2011-03-10

Re: How to write logs>

on Tue Apr 05, 2011 11:53 pm
1) Logs can be generated by using log4j API in java.

2)Log4j API can help you create 2 log files. In one log file, you can write out your normal testing logs and in the other log file, you can output the selenium server logs.

3)Following are some good links describing log4j API
http://www.laliluna.de/articles/log4j-tutorial.html
http://www.mkyong.com/logging/log4j-log4j-properties-examples/

Regards

Ashish
itsthakur@gmail.com
91-9888179981


For online Selenium training go to my website- www.sejsoft.com
Sponsored content

Re: How to write logs>

Back to top
Permissions in this forum:
You cannot reply to topics in this forum