20 fMinLogLevel_ = minLogLevel;
24 return logLevel >= fMinLogLevel_ and not
GetAppenders ().empty ();
26#if !qStroika_Foundation_Debug_DefaultTracingOn
31 va_start (argsList, format);
38 template <
typename CHAR_T,
typename... ARGS>
41 using namespace Characters::Literals;
43 String msg = fmt (args...);
44 DbgTrace (
"Logger::Log ({}, \"{}\")"_f, logLevel, msg);
48#if qStroika_Foundation_Debug_DefaultTracingOn
49 DbgTrace (
"...suppressed by WouldLog: {}"_f, fmt (args...));
53 template <Characters::IFormatLiteral FORMAT_LITERAL,
typename... ARGS>
54 inline void Logger::Log (Priority logLevel,
const FORMAT_LITERAL& fmt, ARGS&&... args)
56 FORMAT_LITERAL::template CheckArgs<ARGS...> ();
57 Log (logLevel,
static_cast<const Characters::FormatString<wchar_t>&
> (fmt), forward<ARGS> (args)...);
64 constexpr EnumNames<Execution::Logger::Priority> DefaultNames<Execution::Logger::Priority>::k{{{
65 {Execution::Logger::Priority::eDebug, L
"Debug"},
66 {Execution::Logger::Priority::eInfo, L
"Info"},
67 {Execution::Logger::Priority::eNotice, L
"Notice"},
68 {Execution::Logger::Priority::eWarning, L
"Warning"},
69 {Execution::Logger::Priority::eError, L
"Error"},
70 {Execution::Logger::Priority::eCriticalError, L
"CriticalError"},
71 {Execution::Logger::Priority::eAlertError, L
"AlertError"},
72 {Execution::Logger::Priority::eEmergency, L
"Emergency"},
String is like std::u32string, except it is much easier to use, often much more space efficient,...
nonvirtual bool WouldLog(Priority logLevel) const
nonvirtual Priority GetMinLogLevel() const
void Log(Priority logLevel, const wchar_t *format,...)
nonvirtual void SetMinLogLevel(Priority minLogLevel)
nonvirtual Traversal::Iterable< shared_ptr< IAppenderRep > > GetAppenders() const
String FormatV(const wchar_t *format, va_list argsList)
printf-style formatting of a va_list, into a String - with one difference from vswprintf: s takes a c...