mirror of
https://github.com/FairRootGroup/FairLogger.git
synced 2025-10-17 18:41:45 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
56780689fc | ||
|
8446c6db0c | ||
|
a0ff4eba50 | ||
|
cfe0f9dc53 | ||
|
cdf887f5da | ||
|
6555aa1dc0 | ||
|
d1f73fe9f0 | ||
|
86ab87de7b |
@@ -7,7 +7,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.9.4 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.9.4 FATAL_ERROR)
|
||||||
cmake_policy(VERSION 3.9...3.14)
|
cmake_policy(VERSION 3.9...3.15)
|
||||||
|
|
||||||
# Project ######################################################################
|
# Project ######################################################################
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
@@ -100,7 +100,6 @@ if(NOT USE_EXTERNAL_FMT)
|
|||||||
endif()
|
endif()
|
||||||
install(TARGETS
|
install(TARGETS
|
||||||
FairLogger
|
FairLogger
|
||||||
${test_targets}
|
|
||||||
${fmt_target}
|
${fmt_target}
|
||||||
|
|
||||||
EXPORT ${PROJECT_EXPORT_SET}
|
EXPORT ${PROJECT_EXPORT_SET}
|
||||||
|
51
README.md
51
README.md
@@ -42,7 +42,7 @@ If FairLogger is built with `-DUSE_BOOST_PRETTY_FUNCTION=ON` and/or `-DUSE_EXTER
|
|||||||
```cmake
|
```cmake
|
||||||
find_package(FairLogger)
|
find_package(FairLogger)
|
||||||
foreach(dep IN LISTS FairLogger_PACKAGE_DEPENDENCIES)
|
foreach(dep IN LISTS FairLogger_PACKAGE_DEPENDENCIES)
|
||||||
 find_package(${dep} ${FairLogger_${dep}_VERSION})
|
find_package(${dep} ${FairLogger_${dep}_VERSION})
|
||||||
endforeach()
|
endforeach()
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -66,8 +66,8 @@ All log calls go through the provided LOG(severity) macro. Output through this m
|
|||||||
A number of additional logging macros are provided:
|
A number of additional logging macros are provided:
|
||||||
|
|
||||||
- `LOGV(severity, verbosity)` Log the line with the provided verbosity, e.g. `LOG(info, veryhigh) << "abcd";`
|
- `LOGV(severity, verbosity)` Log the line with the provided verbosity, e.g. `LOG(info, veryhigh) << "abcd";`
|
||||||
- `LOGF(severity, ...)` The arguments are given to `fmt::format` and the result is logged, e.g. `LOGF(info, "Hello {}!", "world");`
|
- `LOGF(severity, ...)` The arguments are given to `fmt::printf`, which formats the string using a [printf syntax](https://fmt.dev/dev/api.html#printf-formatting) and the result is logged, e.g. `LOGF(info, "Hello %s!", "world");`
|
||||||
- `LOGP(severity, ...)` The arguments are given to `fmt::printf` and the result is logged, e.g. `LOGP(info, "Hello %s!", "world");`
|
- `LOGP(severity, ...)` The arguments are given to `fmt::format`, which formats the string using a [Python-like syntax](https://fmt.dev/dev/syntax.html) and the result is logged, e.g. `LOGP(info, "Hello {}!", "world");`
|
||||||
- `LOGN(severity)` Logs an empty line, e.g. `LOGN(info);`
|
- `LOGN(severity)` Logs an empty line, e.g. `LOGN(info);`
|
||||||
- `LOG_IF(severity, condition)` Logs the line if the provided condition if true
|
- `LOG_IF(severity, condition)` Logs the line if the provided condition if true
|
||||||
- `LOGD(severity, file, line, f)` Logs the line with the provided file, line and function parameters (only if the active verbosity allows it).
|
- `LOGD(severity, file, line, f)` Logs the line with the provided file, line and function parameters (only if the active verbosity allows it).
|
||||||
@@ -87,21 +87,32 @@ where severity level is one of the following:
|
|||||||
|
|
||||||
```C++
|
```C++
|
||||||
"nolog",
|
"nolog",
|
||||||
"fatal",
|
|
||||||
"error",
|
|
||||||
"warn",
|
|
||||||
"state",
|
|
||||||
"info",
|
|
||||||
"debug",
|
|
||||||
"debug1",
|
|
||||||
"debug2",
|
|
||||||
"debug3",
|
|
||||||
"debug4",
|
|
||||||
"trace",
|
"trace",
|
||||||
|
"debug4",
|
||||||
|
"debug3",
|
||||||
|
"debug2",
|
||||||
|
"debug1",
|
||||||
|
"debug",
|
||||||
|
"info",
|
||||||
|
"state",
|
||||||
|
"warn",
|
||||||
|
"error",
|
||||||
|
"fatal",
|
||||||
```
|
```
|
||||||
|
|
||||||
Logger will log the chosen severity and all above it (except "nolog", which deactivates logging for that sink completely). Fatal severity is always logged.
|
Logger will log the chosen severity and all above it (except "nolog", which deactivates logging for that sink completely). Fatal severity is always logged.
|
||||||
|
|
||||||
|
## 3.1 Compile-time severity switch
|
||||||
|
|
||||||
|
The minimum severity level can be configured at compile time via definition of `FAIR_MIN_SEVERITY`:
|
||||||
|
|
||||||
|
```C++
|
||||||
|
#define FAIR_MIN_SEVERITY warn // only allow severities >= warn
|
||||||
|
#include <fairlogger/Logger.h>
|
||||||
|
```
|
||||||
|
|
||||||
|
When `FAIR_MIN_SEVERITY` is not provided, it will be set to `info` if `NDEBUG` is defined, otherwise all severities will be enabled.
|
||||||
|
|
||||||
## 4. Verbosity
|
## 4. Verbosity
|
||||||
|
|
||||||
The log verbosity is controlled via:
|
The log verbosity is controlled via:
|
||||||
@@ -207,8 +218,20 @@ Here is an example adding a custom sink for all severities ("trace" and above).
|
|||||||
|
|
||||||
If only output from custom sinks is desirable, console/file sinks must be deactivated by setting their severity to `"nolog"`.
|
If only output from custom sinks is desirable, console/file sinks must be deactivated by setting their severity to `"nolog"`.
|
||||||
|
|
||||||
|
## Naming conflicts?
|
||||||
|
|
||||||
|
By default, `<fairlogger/Logger.h>` defines unprefixed macros: `LOG`, `LOGV`, `LOGF`, `LOGP`, `LOGN`, `LOGD`, `LOG_IF`.
|
||||||
|
|
||||||
|
Define an option `FAIR_NO_LOG*` to prevent the above unprefixed macros to be defined, e.g.
|
||||||
|
|
||||||
|
```C++
|
||||||
|
#define FAIR_NO_LOG
|
||||||
|
#define FAIR_NO_LOGF
|
||||||
|
#include <fairlogger/Logger.h>
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
GNU Lesser General Public Licence (LGPL) version 3, see [LICENSE](LICENSE).
|
GNU Lesser General Public Licence (LGPL) version 3, see [LICENSE](LICENSE).
|
||||||
|
|
||||||
Copyright (C) 2017-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
|
Copyright (C) 2017-2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
|
||||||
|
@@ -7,7 +7,11 @@
|
|||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
|
#if FMT_VERSION < 60000
|
||||||
#include <fmt/time.h>
|
#include <fmt/time.h>
|
||||||
|
#else
|
||||||
|
#include <fmt/chrono.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstdio> // printf
|
#include <cstdio> // printf
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -108,17 +112,17 @@ const array<string, 12> Logger::fSeverityNames =
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
"NOLOG",
|
"NOLOG",
|
||||||
"FATAL",
|
"TRACE",
|
||||||
"ERROR",
|
|
||||||
"WARN",
|
|
||||||
"STATE",
|
|
||||||
"INFO",
|
|
||||||
"DEBUG",
|
|
||||||
"DEBUG1",
|
|
||||||
"DEBUG2",
|
|
||||||
"DEBUG3",
|
|
||||||
"DEBUG4",
|
"DEBUG4",
|
||||||
"TRACE"
|
"DEBUG3",
|
||||||
|
"DEBUG2",
|
||||||
|
"DEBUG1",
|
||||||
|
"DEBUG",
|
||||||
|
"INFO",
|
||||||
|
"STATE",
|
||||||
|
"WARN",
|
||||||
|
"ERROR",
|
||||||
|
"FATAL"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -421,25 +425,26 @@ void Logger::CycleVerbosityDown()
|
|||||||
|
|
||||||
void Logger::UpdateMinSeverity()
|
void Logger::UpdateMinSeverity()
|
||||||
{
|
{
|
||||||
fMinSeverity = (fConsoleSeverity <= fFileSeverity) ? fFileSeverity : fConsoleSeverity;
|
if (fFileSeverity == Severity::nolog) {
|
||||||
|
fMinSeverity = fConsoleSeverity;
|
||||||
|
} else {
|
||||||
|
fMinSeverity = std::min(fConsoleSeverity, fFileSeverity);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto& it : fCustomSinks) {
|
for (auto& it : fCustomSinks) {
|
||||||
if (fMinSeverity <= it.second.first) {
|
if (fMinSeverity == Severity::nolog) {
|
||||||
fMinSeverity = it.second.first;
|
fMinSeverity = std::max(fMinSeverity, it.second.first);
|
||||||
|
} else if (it.second.first != Severity::nolog) {
|
||||||
|
fMinSeverity = std::min(fMinSeverity, it.second.first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logger::Logging(Severity severity)
|
bool Logger::Logging(Severity severity)
|
||||||
{
|
{
|
||||||
if (Severity::fatal == severity) {
|
return (severity >= fMinSeverity &&
|
||||||
return true;
|
fMinSeverity > Severity::nolog) ||
|
||||||
}
|
severity == Severity::fatal;
|
||||||
if (severity <= fMinSeverity && severity > Severity::nolog) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logger::Logging(const string& severityStr)
|
bool Logger::Logging(const string& severityStr)
|
||||||
@@ -544,22 +549,22 @@ void Logger::RemoveFileSink()
|
|||||||
|
|
||||||
bool Logger::LoggingToConsole() const
|
bool Logger::LoggingToConsole() const
|
||||||
{
|
{
|
||||||
return (fInfos.severity <= fConsoleSeverity &&
|
return (fInfos.severity >= fConsoleSeverity &&
|
||||||
fInfos.severity > Severity::nolog) ||
|
fConsoleSeverity > Severity::nolog) ||
|
||||||
fInfos.severity == Severity::fatal;
|
fInfos.severity == Severity::fatal;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logger::LoggingToFile() const
|
bool Logger::LoggingToFile() const
|
||||||
{
|
{
|
||||||
return (fInfos.severity <= fFileSeverity &&
|
return (fInfos.severity >= fFileSeverity &&
|
||||||
fInfos.severity > Severity::nolog) ||
|
fFileSeverity > Severity::nolog) ||
|
||||||
fInfos.severity == Severity::fatal;
|
fInfos.severity == Severity::fatal;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logger::LoggingCustom(const Severity severity) const
|
bool Logger::LoggingCustom(const Severity severity) const
|
||||||
{
|
{
|
||||||
return (fInfos.severity <= severity &&
|
return (fInfos.severity >= severity &&
|
||||||
fInfos.severity > Severity::nolog) ||
|
severity > Severity::nolog) ||
|
||||||
fInfos.severity == Severity::fatal;
|
fInfos.severity == Severity::fatal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
136
logger/Logger.h
136
logger/Logger.h
@@ -13,6 +13,10 @@
|
|||||||
#warning "The symbol 'DEBUG' is used in FairRoot Logger. undefining..."
|
#warning "The symbol 'DEBUG' is used in FairRoot Logger. undefining..."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(FAIR_MIN_SEVERITY) && defined(NDEBUG)
|
||||||
|
#define FAIR_MIN_SEVERITY info
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FAIRLOGGER_USE_BOOST_PRETTY_FUNCTION
|
#ifdef FAIRLOGGER_USE_BOOST_PRETTY_FUNCTION
|
||||||
#include <boost/current_function.hpp>
|
#include <boost/current_function.hpp>
|
||||||
#endif
|
#endif
|
||||||
@@ -46,33 +50,33 @@ namespace fair
|
|||||||
|
|
||||||
enum class Severity : int
|
enum class Severity : int
|
||||||
{
|
{
|
||||||
nolog,
|
nolog = 0,
|
||||||
fatal,
|
trace = 1,
|
||||||
error,
|
debug4 = 2,
|
||||||
warn,
|
debug3 = 3,
|
||||||
state,
|
debug2 = 4,
|
||||||
info,
|
debug1 = 5,
|
||||||
debug,
|
debug = 6,
|
||||||
debug1,
|
info = 7,
|
||||||
debug2,
|
state = 8,
|
||||||
debug3,
|
warn = 9,
|
||||||
debug4,
|
error = 10,
|
||||||
trace,
|
fatal = 11,
|
||||||
// backwards-compatibility:
|
// backwards-compatibility:
|
||||||
NOLOG = nolog,
|
NOLOG = nolog,
|
||||||
FATAL = fatal,
|
TRACE = trace,
|
||||||
ERROR = error,
|
|
||||||
WARN = warn,
|
|
||||||
warning = warn,
|
|
||||||
WARNING = warn,
|
|
||||||
STATE = state,
|
|
||||||
INFO = info,
|
|
||||||
DEBUG = debug,
|
|
||||||
DEBUG1 = debug1,
|
|
||||||
DEBUG2 = debug2,
|
|
||||||
DEBUG3 = debug3,
|
|
||||||
DEBUG4 = debug4,
|
DEBUG4 = debug4,
|
||||||
TRACE = trace
|
DEBUG3 = debug3,
|
||||||
|
DEBUG2 = debug2,
|
||||||
|
DEBUG1 = debug1,
|
||||||
|
DEBUG = debug,
|
||||||
|
INFO = info,
|
||||||
|
STATE = state,
|
||||||
|
WARNING = warn,
|
||||||
|
warning = warn,
|
||||||
|
WARN = warn,
|
||||||
|
ERROR = error,
|
||||||
|
FATAL = fatal
|
||||||
};
|
};
|
||||||
|
|
||||||
// verbosity levels:
|
// verbosity levels:
|
||||||
@@ -313,6 +317,15 @@ class Logger
|
|||||||
static bool fIsDestructed;
|
static bool fIsDestructed;
|
||||||
static struct DestructionHelper { ~DestructionHelper() { Logger::fIsDestructed = true; }} fDestructionHelper;
|
static struct DestructionHelper { ~DestructionHelper() { Logger::fIsDestructed = true; }} fDestructionHelper;
|
||||||
|
|
||||||
|
static bool constexpr SuppressSeverity(Severity sev)
|
||||||
|
{
|
||||||
|
#ifdef FAIR_MIN_SEVERITY
|
||||||
|
return sev < Severity::FAIR_MIN_SEVERITY;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LogMetaData fInfos;
|
LogMetaData fInfos;
|
||||||
|
|
||||||
@@ -356,32 +369,73 @@ class Logger
|
|||||||
#define MSG_ORIGIN __FILE__, CONVERTTOSTRING(__LINE__), static_cast<const char*>(__FUNCTION__)
|
#define MSG_ORIGIN __FILE__, CONVERTTOSTRING(__LINE__), static_cast<const char*>(__FUNCTION__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// allow user of this header file to prevent definition of the LOG macro, by defining FAIR_NO_LOG before including this header
|
||||||
|
#ifndef FAIR_NO_LOG
|
||||||
|
#undef LOG
|
||||||
|
#define LOG FAIR_LOG
|
||||||
|
#endif
|
||||||
|
// allow user of this header file to prevent definition of the LOGV macro, by defining FAIR_NO_LOGV before including this header
|
||||||
|
#ifndef FAIR_NO_LOGV
|
||||||
|
#undef LOGV
|
||||||
|
#define LOGV FAIR_LOGV
|
||||||
|
#endif
|
||||||
|
// allow user of this header file to prevent definition of the LOGF macro, by defining FAIR_NO_LOGF before including this header
|
||||||
|
#ifndef FAIR_NO_LOGF
|
||||||
|
#undef LOGF
|
||||||
|
#define LOGF FAIR_LOGF
|
||||||
|
#endif
|
||||||
|
// allow user of this header file to prevent definition of the LOGP macro, by defining FAIR_NO_LOGP before including this header
|
||||||
|
#ifndef FAIR_NO_LOGP
|
||||||
|
#undef LOGP
|
||||||
|
#define LOGP FAIR_LOGP
|
||||||
|
#endif
|
||||||
|
// allow user of this header file to prevent definition of the LOGN macro, by defining FAIR_NO_LOGN before including this header
|
||||||
|
#ifndef FAIR_NO_LOGN
|
||||||
|
#undef LOGN
|
||||||
|
#define LOGN FAIR_LOGN
|
||||||
|
#endif
|
||||||
|
// allow user of this header file to prevent definition of the LOGD macro, by defining FAIR_NO_LOGD before including this header
|
||||||
|
#ifndef FAIR_NO_LOGD
|
||||||
|
#undef LOGD
|
||||||
|
#define LOGD FAIR_LOGD
|
||||||
|
#endif
|
||||||
|
// allow user of this header file to prevent definition of the LOG_IF macro, by defining FAIR_NO_LOG_IF before including this header
|
||||||
|
#ifndef FAIR_NO_LOG_IF
|
||||||
|
#undef LOG_IF
|
||||||
|
#define LOG_IF FAIR_LOG_IF
|
||||||
|
#endif
|
||||||
|
|
||||||
// Log line if the provided severity is below or equals the configured one
|
// Log line if the provided severity is below or equals the configured one
|
||||||
#define LOG(severity) \
|
#define FAIR_LOG(severity) \
|
||||||
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
if (fair::Logger::SuppressSeverity(fair::Severity::severity)) ; else \
|
||||||
fair::Logger(fair::Severity::severity, MSG_ORIGIN)
|
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
||||||
|
fair::Logger(fair::Severity::severity, MSG_ORIGIN)
|
||||||
|
|
||||||
// Log line with the given verbosity if the provided severity is below or equals the configured one
|
// Log line with the given verbosity if the provided severity is below or equals the configured one
|
||||||
#define LOGV(severity, verbosity) \
|
#define FAIR_LOGV(severity, verbosity) \
|
||||||
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
if (fair::Logger::SuppressSeverity(fair::Severity::severity)) ; else \
|
||||||
fair::Logger(fair::Severity::severity, fair::Verbosity::verbosity, MSG_ORIGIN)
|
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
||||||
|
fair::Logger(fair::Severity::severity, fair::Verbosity::verbosity, MSG_ORIGIN)
|
||||||
|
|
||||||
// Log with fmt- or printf-like formatting
|
// Log with fmt- or printf-like formatting
|
||||||
#define LOGF(severity, ...) LOG(severity) << fmt::format(__VA_ARGS__)
|
#define FAIR_LOGP(severity, ...) LOG(severity) << fmt::format(__VA_ARGS__)
|
||||||
#define LOGP(severity, ...) LOG(severity) << fmt::sprintf(__VA_ARGS__)
|
#define FAIR_LOGF(severity, ...) LOG(severity) << fmt::sprintf(__VA_ARGS__)
|
||||||
|
|
||||||
// Log an empty line
|
// Log an empty line
|
||||||
#define LOGN(severity) \
|
#define FAIR_LOGN(severity) \
|
||||||
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
if (fair::Logger::SuppressSeverity(fair::Severity::severity)) ; else \
|
||||||
fair::Logger(fair::Severity::severity, fair::Verbosity::verylow, MSG_ORIGIN).LogEmptyLine()
|
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
||||||
|
fair::Logger(fair::Severity::severity, fair::Verbosity::verylow, MSG_ORIGIN).LogEmptyLine()
|
||||||
|
|
||||||
// Log with custom file, line, function
|
// Log with custom file, line, function
|
||||||
#define LOGD(severity, file, line, f) \
|
#define FAIR_LOGD(severity, file, line, f) \
|
||||||
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
if (fair::Logger::SuppressSeverity(severity)) ; else \
|
||||||
fair::Logger(severity, file, line, f)
|
for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
|
||||||
|
fair::Logger(severity, file, line, f)
|
||||||
|
|
||||||
#define LOG_IF(severity, condition) \
|
#define FAIR_LOG_IF(severity, condition) \
|
||||||
for (bool fairLOggerunLikelyvariable2 = false; condition && !fairLOggerunLikelyvariable2; fairLOggerunLikelyvariable2 = true) \
|
if (fair::Logger::SuppressSeverity(fair::Severity::severity)) ; else \
|
||||||
LOG(severity)
|
for (bool fairLOggerunLikelyvariable2 = false; condition && !fairLOggerunLikelyvariable2; fairLOggerunLikelyvariable2 = true) \
|
||||||
|
LOG(severity)
|
||||||
|
|
||||||
#endif // FAIR_LOGGER_H
|
#endif // FAIR_LOGGER_H
|
||||||
|
@@ -190,8 +190,8 @@ int main()
|
|||||||
cout << "cout: setting severity to 'trace'" << endl;
|
cout << "cout: setting severity to 'trace'" << endl;
|
||||||
Logger::SetConsoleSeverity(Severity::trace);
|
Logger::SetConsoleSeverity(Severity::trace);
|
||||||
|
|
||||||
LOGF(info, "Hello {} {}!", "world", ":-)");
|
LOGP(info, "Hello {} {}!", "world", ":-)");
|
||||||
LOGP(info, "Hello %s %s!", "world", ":-)");
|
LOGF(info, "Hello %s %s!", "world", ":-)");
|
||||||
|
|
||||||
cout << "cout: setting verbosity to 'high'" << endl;
|
cout << "cout: setting verbosity to 'high'" << endl;
|
||||||
Logger::SetVerbosity(Verbosity::high);
|
Logger::SetVerbosity(Verbosity::high);
|
||||||
|
Reference in New Issue
Block a user