Setting ReportLevel : Automation API

Setting ReportLevel

Class library usage, coding and language questions.

Setting ReportLevel

Postby enneper » Tue May 24, 2011 6:33 pm

This should be simple but can not find a solution.

I want to pass in the the desired report level name ("Info", "Debug" et all) as an argument to my ranorex application and then set the report level accordingly. I have the following:

string myLevelName = args[0]; // for example "Info"
ReportLevel rl = new ReportLevel(myLevelName, ??, null);
Report.Setup(rl, myLogFile, true);

My Question: How do I set the the level (?? above) in the ReportLevel constructor using the report level name (e.g. "Info", "Debug", etc)?
enneper
 
Posts: 2
Joined: Tue May 24, 2011 6:18 pm

Re: Setting ReportLevel

Postby Support Team » Tue May 24, 2011 7:15 pm

The following code should do that :)
ReportLevel rl = ReportLevel.Parse(myLevelName);

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests

cron