More verbose logging for the server.

This commit is contained in:
lotodore
2008-03-19 23:39:59 +00:00
parent 0575d1eb1c
commit c8b38d0e57
6 changed files with 88 additions and 11 deletions
+10 -1
View File
@@ -24,10 +24,11 @@
#include <string>
#include <sstream>
void loghelper_init(const std::string &logDir);
void loghelper_init(const std::string &logDir, int logLevel);
void internal_log_err(const std::string &msg);
void internal_log_msg(const std::string &msg);
void internal_log_level(const std::string &msg, int logLevel);
#define LOG_ERROR(e) \
do \
@@ -45,6 +46,14 @@ void internal_log_msg(const std::string &msg);
internal_log_msg(outStream.str()); \
} \
while(false)
#define LOG_VERBOSE(e) \
do \
{ \
std::ostringstream outStream; \
outStream << e << std::endl; \
internal_log_level(outStream.str(), 2); \
} \
while(false)
#endif