libqbase/example/main.cpp
Michael Chernigin 8a980e3317
chore: logger refactoring to comply with clang-tidy (#2)
* fix: fix file logger constructor
* refactor: clang-tidy fixes
* fix: fix gear
2023-09-19 13:03:45 +04:00

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;
}