58 while (sink_stack_.size()>1) {
69 std::stack<int> level_stack_;
74 #define OST_DO_LOGGING_(m, l) if (::ost::Logger::Instance().GetVerbosityLevel()>=l) {\
75 std::stringstream tmp_s__; \
76 tmp_s__ << m << std::endl; \
77 ::ost::Logger::Instance().GetCurrentSink()->LogMessage(tmp_s__.str(), l); \
80 #define WARN_DEPRECATED(m) OST_DO_LOGGING_(m, ::ost::Logger::WARNING)
81 #define PUSH_VERBOSITY(n) ::ost::Logger::Instance().PushVerbosityLevel(n)
82 #define POP_VERBOSITY(n) ::ost::Logger::Instance().PopVerbosityLevel()
84 #define LOG_ERROR(m) OST_DO_LOGGING_(m, ::ost::Logger::QUIET)
85 #define LOG_WARNING(m) OST_DO_LOGGING_(m, ::ost::Logger::WARNING)
86 #define LOG_SCRIPT(m) OST_DO_LOGGING_(m, ::ost::Logger::SCRIPT)
87 #define LOG_INFO(m) OST_DO_LOGGING_(m, ::ost::Logger::INFO)
88 #define LOG_VERBOSE(m) OST_DO_LOGGING_(m, ::ost::Logger::VERBOSE)
93 # define LOG_DEBUG(m) OST_DO_LOGGING_(m, ::ost::Logger::DEBUG)
94 # define LOG_TRACE(m) OST_DO_LOGGING_(m, ::ost::Logger::TRACE)
int GetVerbosityLevel() const
void PushFile(const String &filename)
void PushSink(LogSinkPtr &sink)
Logger & operator=(const Logger &)
LogSinkPtr GetCurrentSink()
void PopFile()
DEPRECATED use PopSink() instead.
static Logger & Instance()
void PushVerbosityLevel(int level)
#define DLLEXPORT_OST_BASE
boost::shared_ptr< LogSink > LogSinkPtr
std::stack< LogSinkPtr > LogSinkStack