Skip to content
Snippets Groups Projects
Commit d8f39b72 authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

Change level of debug messages

parent 616a0ac6
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,14 @@ ...@@ -35,14 +35,14 @@
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <iomanip>
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
using namespace std; using namespace std;
std::ostream& Debug::os=std::cerr; std::ostream& Debug::os=std::cerr;
Debug::LEVEL Debug::debugLevel=Debug::ERROR; Debug::LEVEL Debug::debugLevel=Debug::ALL;
int Debug::MSG_Count=0; int Debug::MSG_Count=0;
int Debug::ERR_Count=0; int Debug::ERR_Count=0;
int Debug::WAR_Count=0; int Debug::WAR_Count=0;
...@@ -69,8 +69,7 @@ void Debug::setDebugLevel(Debug::LEVEL level) ...@@ -69,8 +69,7 @@ void Debug::setDebugLevel(Debug::LEVEL level)
} }
void Debug::Messages(const char *format, ...) void Debug::Messages(const char *format, ...)
{ {
switch (debugLevel) { switch (debugLevel) {
case ALL: case ALL:
...@@ -82,7 +81,7 @@ void Debug::Messages(const char *format, ...) ...@@ -82,7 +81,7 @@ void Debug::Messages(const char *format, ...)
vsprintf (msg,format ,ap); vsprintf (msg,format ,ap);
va_end (ap); va_end (ap);
os<<"Info["<<MSG_Count<<"]"<<msg<<endl; os<<"Info ["<< std::setw(2) <<MSG_Count<<"]: "<<msg<<endl;
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment