49 #define FL_DBG(logger, msg) do { if (FIFE::LogManager::instance()->isVisible(logger.getModule())) logger.log(FIFE::LogManager::LEVEL_DEBUG, msg); } while(0) 53 #define FL_LOG(logger, msg) do { if (FIFE::LogManager::instance()->isVisible(logger.getModule())) logger.log(FIFE::LogManager::LEVEL_LOG, msg); } while(0) 57 #define FL_WARN(logger, msg) do { if (FIFE::LogManager::instance()->isVisible(logger.getModule())) logger.log(FIFE::LogManager::LEVEL_WARN, msg); } while(0) 61 #define FL_ERR(logger, msg) do { if (FIFE::LogManager::instance()->isVisible(logger.getModule())) logger.log(FIFE::LogManager::LEVEL_ERROR, msg); } while(0) 66 #define FL_PANIC(logger, msg) do { if (FIFE::LogManager::instance()->isVisible(logger.getModule())) logger.log(FIFE::LogManager::LEVEL_PANIC, msg); } while(0) 70 #define FL_DBG(logger, msg) 71 #define FL_LOG(logger, msg) 72 #define FL_WARN(logger, msg) 73 #define FL_ERR(logger, msg) 74 #define FL_PANIC(logger, msg) 84 LMsg(
const std::string& msg=
""):
str(msg) {}
88 std::ostringstream stream;
132 void setLevelFilter(
LogLevel level);
155 void clearVisibleModules();
163 void setLogToPrompt(
bool logtoprompt);
167 bool isLogToPrompt();
171 void setLogToFile(
bool logtofile);
188 void validateModuleDescription(
logmodule_t module);
263 template <
class Ch,
class Tr>
264 basic_ostream<Ch,Tr>& operator<<( basic_ostream<Ch,Tr>& s,
const FIFE::pprint& p ) {
266 << hex << setw( 2*
sizeof(
void*) ) << setfill(
'0')
267 <<
reinterpret_cast<uint64_t
>( p.p );
LMsg(const std::string &msg="")
Helper class to create log strings out from separate parts Usage: LMsg("some text") << variable << "...
std::vector< logmodule_t > module_check_stack
std::ofstream * m_logfile
logmodule_t
Modules available for logging.
Helper for printing a pointer.
logmodule_t getModule() const
gets module where this logger is associated to
Create a Logger instance to communicate with LogManager Logger stores information about the current m...
Logmanager takes care of log filtering and output direction.
LMsg & operator<<(const T &t)
static LogManager * m_instance
LogLevel
Loglevel is used to set a treshold for output messages + related filter E.g.