1 /******************************
2 ** Tsunagari Tile Engine **
4 ** Copyright 2011 OmegaSDG **
5 ******************************/
15 This enum defines the logging modes.
18 MM_SILENT
, // Only error messages are sent to the console.
19 MM_DEVELOPER
, // Error messages and development messages are sent to the
21 MM_DEBUG
// All messages are sent to the console.
26 This is a singleton that handles error messages.
31 //! Set message mode. (SILENT, DEVELOPER, or DEBUG)
32 static void setMode(message_mode_t mode
);
34 //! Send a message to the console.
36 @param domain the name of the message's origin (traditionally,
37 the name of the function we're in)
38 @param message the message to be sent
40 static void err(std::string domain
, std::string message
);
41 static void dev(std::string domain
, std::string message
);
42 static void dbg(std::string domain
, std::string message
);
45 static Log
* instance(); // Access to our singleton instance.
46 static std::string
& rtrim(std::string
& str
);
48 Log() {}; // Hide our constructor.
50 static Log
* pInstance
; // Our class instance.
51 message_mode_t mode
; // Message mode that has been set.