Page 1 of 1

Setting ReportLevel

Posted: Tue May 24, 2011 5:33 pm
by enneper
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)?

Re: Setting ReportLevel

Posted: Tue May 24, 2011 6:15 pm
by Support Team
The following code should do that :)
ReportLevel rl = ReportLevel.Parse(myLevelName);
Regards,
Alex
Ranorex Team