42 return m_levelOptions.at(
level);
47 const auto index = m_levelOptions.indexOf(
level, 0, Qt::CaseInsensitive);
48 if (index < 0 || index >= m_levelOptions.count())
62 return tr(m_levelNames.at(
level).toUtf8());
67 return m_levelOptions;
80 inline static const QStringList m_levelOptions {
81 QStringLiteral(
"FATAL")
82 , QStringLiteral(
"ERROR")
83 , QStringLiteral(
"WARNING")
84 , QStringLiteral(
"INFO")
85 , QStringLiteral(
"DEBUG")
86 , QStringLiteral(
"VERBOSE")
92 inline static const QStringList m_levelNames = {
95 , QT_TR_NOOP(
"Warning")
98 , QT_TR_NOOP(
"Verbose")
static int level
Definition ArchNetworkWinsock.cpp:31
static QString toString(const LogLevel::Level &level)
Definition LogLevel.h:53
static QString toString(const int &level)
Definition LogLevel.h:58
static QString toOption(const int &level)
Definition LogLevel.h:38
static QStringList logLevelOptions()
Definition LogLevel.h:65
static QString toOption(const LogLevel::Level &level)
Definition LogLevel.h:33
static QStringList logLevelNames()
Definition LogLevel.h:70
Level
Log levels.
Definition LogLevel.h:22
@ Warning
For minor errors and warnings.
Definition LogLevel.h:26
@ Print
For print only (no file or time).
Definition LogLevel.h:23
@ Info
For informational messages.
Definition LogLevel.h:27
@ Fatal
For fatal errors.
Definition LogLevel.h:24
@ Error
For serious errors.
Definition LogLevel.h:25
@ Debug
For important debugging messages.
Definition LogLevel.h:28
@ Verbose
For verbose debugging messages.
Definition LogLevel.h:29
static LogLevel::Level fromOption(const QString &level)
Definition LogLevel.h:45