1 /******************************
2 ** Tsunagari Tile Engine **
4 ** Copyright 2011 OmegaSDG **
5 ******************************/
15 //! This enum defines the logging modes.
17 //! Only error messages are sent to the console.
19 //! Error and development messages are sent to the console.
21 //! All messages are sent to the console.
25 //! This is a singleton that handles error messages.
29 //! Set message mode. (SILENT, DEVELOPER, or DEBUG)
30 static void setMode(message_mode_t mode
);
32 //! Send a message to the console.
34 @param domain the name of the message's origin (traditionally,
35 the name of the function we're in)
36 @param message the message to be sent
38 static void err(std::string domain
, std::string message
);
39 static void dev(std::string domain
, std::string message
);
40 static void dbg(std::string domain
, std::string message
);
42 //! Send a blank line to the console.
46 //! Access to our singleton instance.
47 static Log
* instance();
48 static std::string
& rtrim(std::string
& str
);
50 //! Hide our constructor.
54 //! Our class instance.
55 static Log
* pInstance
;
57 //! Controls verbosity.