minor changes to QSE::App
This commit is contained in:
parent
caa11c5e0d
commit
298958da4c
@ -40,17 +40,17 @@
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
#define QSE_APP_LOG_ENABLED(app, mask) (((app)->getLogMask() & mask) == mask)
|
||||
#define QSE_APP_LOG0(app, mask, fmt) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt); } while(0)
|
||||
#define QSE_APP_LOG1(app, mask, fmt, a1) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1); } while(0)
|
||||
#define QSE_APP_LOG2(app, mask, fmt, a1, a2) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2); } while(0)
|
||||
#define QSE_APP_LOG3(app, mask, fmt, a1, a2, a3) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3); } while(0)
|
||||
#define QSE_APP_LOG4(app, mask, fmt, a1, a2, a3, a4) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3, a4); } while(0)
|
||||
#define QSE_APP_LOG5(app, mask, fmt, a1, a2, a3, a4, a5) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3, a4, a5); } while(0)
|
||||
#define QSE_APP_LOG6(app, mask, fmt, a1, a2, a3, a4, a5, a6) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3, a4, a5, a6); } while(0)
|
||||
#define QSE_APP_LOG7(app, mask, fmt, a1, a2, a3, a4, a5, a6, a7) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3, a4, a5, a6, a7); } while(0)
|
||||
#define QSE_APP_LOG8(app, mask, fmt, a1, a2, a3, a4, a5, a6, a7, a8) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3, a4, a5, a6, a7, a8); } while(0)
|
||||
#define QSE_APP_LOG9(app, mask, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) do { if (QSE_APP_LOG_ENABLED(app, mask)) app->logfmt(mask, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9); } while(0)
|
||||
#define QSE_APP_LOG_ENABLED(app, mask) (((app)->getLogMask() & (mask)) == (mask))
|
||||
#define QSE_APP_LOG0(app, mask, fmt) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt); } while(0)
|
||||
#define QSE_APP_LOG1(app, mask, fmt, a1) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1); } while(0)
|
||||
#define QSE_APP_LOG2(app, mask, fmt, a1, a2) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2); } while(0)
|
||||
#define QSE_APP_LOG3(app, mask, fmt, a1, a2, a3) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3); } while(0)
|
||||
#define QSE_APP_LOG4(app, mask, fmt, a1, a2, a3, a4) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3, a4); } while(0)
|
||||
#define QSE_APP_LOG5(app, mask, fmt, a1, a2, a3, a4, a5) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3, a4, a5); } while(0)
|
||||
#define QSE_APP_LOG6(app, mask, fmt, a1, a2, a3, a4, a5, a6) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3, a4, a5, a6); } while(0)
|
||||
#define QSE_APP_LOG7(app, mask, fmt, a1, a2, a3, a4, a5, a6, a7) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3, a4, a5, a6, a7); } while(0)
|
||||
#define QSE_APP_LOG8(app, mask, fmt, a1, a2, a3, a4, a5, a6, a7, a8) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3, a4, a5, a6, a7, a8); } while(0)
|
||||
#define QSE_APP_LOG9(app, mask, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) do { if (QSE_APP_LOG_ENABLED(app, (mask))) app->logfmt((mask), fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9); } while(0)
|
||||
|
||||
class App: public Uncopyable, public Types, public Mmged
|
||||
{
|
||||
@ -193,11 +193,8 @@ public:
|
||||
void logfmtv (int mask, const qse_char_t* fmt, va_list ap);
|
||||
|
||||
protected:
|
||||
virtual void log_write (int mask, const qse_char_t* msg, qse_size_t len)
|
||||
{
|
||||
// do nothing
|
||||
// subclasses should override this if needed.
|
||||
}
|
||||
// subclasses may override this if the defaulg logging output is not desired.
|
||||
virtual void log_write (int mask, const qse_char_t* msg, qse_size_t len);
|
||||
|
||||
private:
|
||||
App* _prev_app;
|
||||
|
@ -591,6 +591,12 @@ void App::logfmtv (int mask, const qse_char_t* fmt, va_list ap)
|
||||
/*if (this->threaded)*/ this->_log.mtx.unlock ();
|
||||
}
|
||||
|
||||
// default log message output implementation
|
||||
void App::log_write (int mask, const qse_char_t* msg, qse_size_t len)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_END_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user