Commit 7351113c authored by Davis King's avatar Davis King

- Fixed some spelling errors

 - Changed the test driver so that when it sets the logging level it now
   sets it for all loggers.  Not just ones that start with "test."

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403390
parent 4b1eef3d
......@@ -28,7 +28,7 @@ int main (int argc, char** argv)
parser.add_option("n","How many times to run the selected tests. The default is 1.",1);
parser.add_option("d","log debugging statements to file debug.txt.");
parser.add_option("l","Set the logging level (all, trace, debug, info, warn, error, or fatal), the default is all.",1);
parser.add_option("a","Append debugging messsages to debug.txt rather than clearning the file at program startup.");
parser.add_option("a","Append debugging messages to debug.txt rather than clearing the file at program startup.");
parser.add_option("q","Be quiet. Don't print the testing progress or results to standard out.");
unsigned long num = 1;
......@@ -73,34 +73,33 @@ int main (int argc, char** argv)
ofstream fout;
if (parser.option("d"))
{
logger l("test");
if (parser.option("a"))
fout.open("debug.txt",ios::app);
else
fout.open("debug.txt");
l.set_output_stream(fout);
set_all_logging_output_streams(fout);
if (parser.option("l").count() == 0)
l.set_level(LALL);
set_all_logging_levels(LALL);
else if (parser.option("l").argument() == "all")
l.set_level(LALL);
set_all_logging_levels(LALL);
else if (parser.option("l").argument() == "trace")
l.set_level(LTRACE);
set_all_logging_levels(LTRACE);
else if (parser.option("l").argument() == "debug")
l.set_level(LDEBUG);
set_all_logging_levels(LDEBUG);
else if (parser.option("l").argument() == "info")
l.set_level(LINFO);
set_all_logging_levels(LINFO);
else if (parser.option("l").argument() == "warn")
l.set_level(LWARN);
set_all_logging_levels(LWARN);
else if (parser.option("l").argument() == "error")
l.set_level(LERROR);
set_all_logging_levels(LERROR);
else if (parser.option("l").argument() == "fatal")
l.set_level(LFATAL);
set_all_logging_levels(LFATAL);
}
else
{
logger l("test");
l.set_level(LNONE);
set_all_logging_levels(LNONE);
}
unsigned long num_of_failed_tests = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment