ultimatepp/bazaar/LogCtrlTest/main.cpp
kohait 539991f470 bazaar: LogCtrl: redirect entire Logging facility of Upp to a Ctrl
git-svn-id: svn://ultimatepp.org/upp/trunk@3320 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-03-31 08:32:17 +00:00

46 lines
824 B
C++

#include "LogCtrlTest.h"
LogCtrlTest::LogCtrlTest()
{
CtrlLayout(*this, "Window title");
Add(log.HSizePos().VSizePos(0,20));
clear <<= THISBACK(Clear);
save <<= THISBACK(Save);
//SetTimeCallback(-500, callback(&log, &LogCtrl::Flush));
log.Log();
LOG("This text comes from the LOG macro");
log.Log(false);
LOG("This should go to the previous Log stream, whatever it is");
log.Reset();
LOG("And this should go to the StdLog in any case");
///
log.Log();
RLOG("Using the log levels:");
ERR("Error message");
INFO("Hallo, info");
WARN("A Warning");
LogLev(LERR);
ERR("Another Error Message");
INFO("Another info");
WARN("Another Warning");
ONLL(1)
{
int a = 0; //do log level dependant stuff
}
}
GUI_APP_MAIN
{
LogCtrlTest().Run();
}