Setting ReportLevel

Class library usage, coding and language questions.
enneper
Posts: 2
Joined: Tue May 24, 2011 5:18 pm

Setting ReportLevel

Post by enneper » Tue May 24, 2011 5: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)?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Setting ReportLevel

Post by Support Team » Tue May 24, 2011 6:15 pm

The following code should do that :)
ReportLevel rl = ReportLevel.Parse(myLevelName);
Regards,
Alex
Ranorex Team