Logger.h 653 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // $Id: Logger.h 147 2007-02-24 06:13:17Z super_gb $
  2. #ifndef LOGGER_H
  3. #define LOGGER_H
  4. // The Log Class : Useful to write debug or info messages
  5. #include "NoCopy.h"
  6. #include "StdString.h"
  7. class Logger : public NoCopy<Logger>
  8. {
  9. public:
  10. // Constructor, opens log file for writing.
  11. explicit Logger(const RString& logFileName);
  12. // Destructor, closes log file.
  13. virtual ~Logger(void);
  14. // Enters a message in the log. The message will be timestamped.
  15. void Log(const char* logText, ...);
  16. private:
  17. RString m_LogFile;
  18. };
  19. // Visible from every part of programm
  20. extern Logger *LOGGER;
  21. #endif // LOGGER_H