void Task::init() { L_FUNC(""); L_INFO("+++ test Logger"); L_FATAL("L_FATAL"); L_ERROR("L_ERROR"); L_WARN("L_WARN"); L_INFO("L_INFO"); L_DEBUG("L_DEBUG"); L_INFO("--- test Logger"); L_INFO(QString()); // --> "?" L_INFO(" \n Trimmed \n\n"); // --> whitespace removed from start and end L_INFO("UTF-8 Unicode text: äöü àéè"); QString formattedOutput1 = "JSON output 1:\n" "{\n" " \"firstName\": \"Mario\",\n" " \"age\": 44\n" "}" ; L_INFO(formattedOutput1); QString formattedOutput2 = "{<br> \"firstName\": \"Mario\",<br> \"age\": 44<br>}"; L_INFO(formattedOutput2.prepend("JSON output 2:<br>").replace("<br>", "\n")); QTimer::singleShot(1000, this, SLOT(slotRun())); QTimer::singleShot(1000, this, SLOT(slotRun())); QTimer::singleShot(3000, this, SLOT(slotRun())); QTimer::singleShot(6000, this, SLOT(theEnd())); }
Dialog::Dialog(QWidget *parent) : QDialog(parent) , ui(new Ui::Dialog) { L_FUNC(""); // qDebug("Dialog::Dialog"); ui->setupUi(this); EventLog *eventLog = new EventLog(this); QObject::connect(eventLog, SIGNAL(eventInfo(const QString&)), this, SLOT(eventInfo(const QString&)), Qt::QueuedConnection); // Qt::QueuedConnection: Qt 5.4.x Debian installEventFilter(eventLog); L_INFO("+++ test Logger"); L_FATAL("L_FATAL"); L_ERROR("L_ERROR"); L_WARN("L_WARN"); L_NOTE("L_NOTE"); L_INFO("L_INFO"); L_DEBUG("L_DEBUG"); L_INFO("--- test Logger"); L_NOTE("Start"); }