Page 1 of 1

Custom Logger

Posted: Wed Mar 10, 2010 6:24 pm
by atom
Hiya,

Am looking to implement IReportLogger for my own custom logger, I have a few questions:

- How can i only log via my own logger and not the build in ranorex logger
(i.e turn off ranorex logging, and only use my logger)

- IReportLogger seems to be missing a few methods:
- Setup
- LogHTML
- LogXML
The setup one is needed to pass say the output filename to the custom logger

Cheers

Re: Custom Logger

Posted: Thu Mar 11, 2010 10:34 am
by Support Team
Hi,

Just attach(Ranorex.AttachLogger()) and don't call the Ranorex.Setup(). After attaching your logger you only have to invoke the Ranorex.Report.Start().

The Ranorex.Setup method only creates and instantiates the Ranorex standard loggers (i.e. ConsoleLogger and XMLLogger). If you want to set e.g. the output filename for your custom logger you have to do this in your own implementation.

LogHtml and LogXML are static members of the Report class and working on all current attached report loggers. So if you implement the LogText and LogData interfaces the Report class calls your methods internally.

Regards,
Peter
Ranorex Support Team

Re: Custom Logger

Posted: Thu Mar 11, 2010 4:11 pm
by atom
cool, thanks for reply.