40 namespace RestFrames {
45 enum LogType { LogError, LogWarning, LogInfo,
46 LogDebug, LogVerbose };
58 RFLog(
const std::string& source,
LogType def_type = LogInfo);
67 void SetSource(
const std::string& source);
132 static std::ostream* m_Ostr;
135 static std::map<LogType, bool> m_PrintMap;
136 std::map<LogType, std::string> m_TypeMap;
137 std::map<LogType, std::string> m_ColorMap;
141 std::string GetFormattedSource()
const;
142 std::string GetFormattedMessage(
const std::string& message);
144 void PrintObject(
const RFBase* objPtr);
146 void PrintList(
const RFList<T>* listPtr);
150 std::string m_Source;
151 std::ostringstream m_Message;
184 const RFList<RFBase>* Log(
const RFList<T>* ptr){
return (
const RFBaseList*)ptr; }
187 #define LogEnd RFLog::EndMessage
197 virtual const char* what()
const throw(){
198 return m_Message.c_str();
202 std::string m_Message;
211 std::map<RestFrames::LogType,bool> InitPrintMap();