namespace { // // IMPORTANT: Static objects with non-trivial constructors are NOT allowed // in logger module. Allocate buffers only and do lazy initialization of // globals in Logger::getDefault(). // // Logging subsystem is used almost in every module, and logging API can be // called from constructors of static objects in various modules. As // ordering of static objects initialization between modules is undefined, // this means some module may call logging api before logging static // variables are initialized if any. This will result in AV. To avoid such // use cases keep logging module free from static variables that require // initialization with functions called by CRT. //
// by default log everything const Logger::LogLevel defaultLogLevel = Logger::LOG_TRACE;
if (!reply->appender) { // Memory leak by design. Not an issue at all as this is global // object. OS will do resources clean up anyways when application // terminates and the default log appender should live as long as // application lives.
reply->appender = new (defaultLogAppenderMemory) StreamLogAppender(
std::cout);
}
if (Initializing == state) { // Recursive call to Logger::defaultLogger.
initializingLogging();
} elseif (NotInitialized == state) {
state = Initializing;
initializeLogging();
state = Initialized;
}
Logger::ScopeTracer::~ScopeTracer() { if (needLog) { // we don't know what line is end of scope at, so specify line 0 // and add note about line when the scope begins
log.log(level, file.c_str(), 0, func.c_str(),
tstrings::any() << "Exiting " << scope << " (entered at "
<< FileUtils::basename(file) << ":" << line << ")");
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-09-09)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.