random_utils/include/random_utils/LogManager.h

Go to the documentation of this file.
00001 
00002 #ifndef _VRSODE_LOG_MANAGER_H_
00003 #define _VRSODE_LOG_MANAGER_H_
00004 
00005 #include <iostream>
00006 
00007 namespace random_utils
00008 {
00009 
00010 class LogManager
00011 {
00012 public:
00013     static void error(const char* p_file, const char* p_text)
00014     {
00015         std::cerr << "ERROR:   " << p_file << ": " << p_text << std::endl;
00016     }
00017 
00018     static void warning(const char* p_file, const char* p_text)
00019     {
00020         std::cout << "WARNING: " << p_file << ": " << p_text << std::endl;
00021     }
00022 
00023     static void debug(const char* p_file, const char* p_text)
00024     {
00025 #ifdef _DEBUG
00026         std::cout << "DEBUG:   " << p_file << ": " << p_text << std::endl;
00027 #endif
00028     }
00029 };
00030 
00031 }
00032 
00033 #define rErr(x) random_utils::LogManager::error(__FILE__, x);
00034 #define rWrn(x) random_utils::LogManager::warning(__FILE__, x);
00035 #define rDbg(x) random_utils::LogManager::debug(__FILE__, x);
00036 
00037 #endif

Generated on Fri May 11 21:01:58 2007 for Random Racer by  doxygen 1.5.1