17 #include <boost/function.hpp> 18 #include <boost/scoped_ptr.hpp> 33 #if _WIN32 || _WIN64 // WIN 35 #define XM_UTIL2(line) UTIL##line 36 #define XM_UTIL(line) XM_UTIL2(line) 37 #define XM_LOG(A, B) \ 38 ::xms::XmLog::Instance().Log(__FILE__, __LINE__, A, B); \ 40 static std::string XM_UTIL(__LINE__); \ 42 if(XM_UTIL(__LINE__).empty()) \ 44 XM_UTIL(__LINE__) = xms::g_xmUtil; \ 53 extern std::string g_xmUtil;
56 #define XM_LOG(A, B) ::xms::XmLog::Instance().Log(__FILE__, __LINE__, A, B); 104 typedef std::vector<std::pair<xmlog::MessageTypeEnum, std::string>>
MessageStack;
119 void Log(
const char*
const a_file,
122 std::string a_message);
124 MessageStack GetAndClearStack();
125 std::string GetAndClearStackStr();
126 static XmLogFilenameCallback& LogFilenameCallback();
127 static std::string LogFilename();
134 boost::scoped_ptr<Impl>
m;
std::vector< std::pair< xmlog::MessageTypeEnum, std::string > > MessageStack
Container type used to store log messages.
Warning message for the user.
Details of internal operation.
MessageTypeEnum
Log level for XM_LOG.
Base class for classes that follow the singleton pattern.
boost::scoped_ptr< Impl > m
Implementation pointer.
boost::function< std::string()> XmLogFilenameCallback
Callback to return the name of the log file.
Informational message for the user.
Critical error message for the user.