mirror of
https://github.com/mchernigin/libqbase.git
synced 2025-01-03 13:17:41 +03:00
8a980e3317
* fix: fix file logger constructor * refactor: clang-tidy fixes * fix: fix gear
20 lines
573 B
C++
20 lines
573 B
C++
#include <baselib/logger/prelude.h>
|
|
#include <QCoreApplication>
|
|
#include <QDebug>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
auto loggerManager = base::logger::LoggerManager::globalInstance();
|
|
|
|
loggerManager->addLogger<base::logger::ConsoleLogger>(QtDebugMsg);
|
|
loggerManager->addLogger<base::logger::FileLogger>(QtWarningMsg, "appname", "appname.log");
|
|
loggerManager->addLogger<base::logger::SyslogLogger>(LOG_LEVEL_DISABLED, "appname");
|
|
|
|
qDebug() << "Hello?";
|
|
qInfo() << "Hello?";
|
|
qWarning() << "Hello?";
|
|
qCritical() << "Hello?";
|
|
|
|
return 0;
|
|
}
|