Qt6 migration: LtsWidgets API fixes, LtsWebSocket logger init, RTI Docker install
- LtsWidgets: Fixed Qt6 API compatibility issues - QWheelEvent::delta() → angleDelta().y() - QStyleOption::init() → initFrom() - QComboBox activated signal signature change - QTextCodec removal (UTF-8 default in Qt6) - Missing widget includes added - LtsWebSocket: Fixed m_logger reference initialization - Added NGLLoggerBootstrap includes - Proper initialization in constructor initializer lists - CMake: Added BUILD_LTSWEBSOCKET option for temporary exclusion - Docker: RTI Connext permanent installation script added - ci/install-rti-in-docker.sh for persistent RTI setup - Removes need for volume mounting RTI into container - BUILD options: FilterManagement, RTI, Codification, Grantlee, LtsWebSocket can be disabled for partial builds during migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
69 files changed
+12765
-14202
No files matched your search
Executable → Regular
+172
-187
@@ -1,59 +1,56 @@
|
||||
/**
|
||||
* Logger interface
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
* Logger interface
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QPointF>
|
||||
#include <QSize>
|
||||
#include <QRect>
|
||||
#include <QRectF>
|
||||
#include <QList>
|
||||
#include "ngllogger_export.h"
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <ngllogger_export.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
class INGLLogger;
|
||||
// keep in sync with log4qt/level.h
|
||||
enum class LogLevel
|
||||
{
|
||||
Undefined = 0,
|
||||
Trace = 64,
|
||||
Debug = 96,
|
||||
Info = 128,
|
||||
Warning = 150,
|
||||
Error = 182,
|
||||
Fatal = 214,
|
||||
enum class LogLevel {
|
||||
Undefined = 0,
|
||||
Trace = 64,
|
||||
Debug = 96,
|
||||
Info = 128,
|
||||
Warning = 150,
|
||||
Error = 182,
|
||||
Fatal = 214,
|
||||
};
|
||||
|
||||
class LogStreamHelper
|
||||
{
|
||||
public:
|
||||
inline LogStreamHelper(INGLLogger &logger, LogLevel level, const char *const file, int line, const char *const function)
|
||||
: m_logger(logger)
|
||||
, m_level(level)
|
||||
, m_line(line)
|
||||
, m_file(file)
|
||||
, m_func(function)
|
||||
{}
|
||||
inline ~LogStreamHelper(); // after INGLLogger class definition
|
||||
public:
|
||||
inline LogStreamHelper(INGLLogger& logger, LogLevel level, const char* const file, int line,
|
||||
const char* const function)
|
||||
: m_logger(logger), m_level(level), m_line(line), m_file(file), m_func(function)
|
||||
{
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline LogStreamHelper &operator<<(const T &val);
|
||||
inline ~LogStreamHelper(); // after INGLLogger class definition
|
||||
|
||||
private:
|
||||
std::ostringstream m_buffer;
|
||||
NGL::INGLLogger &m_logger;
|
||||
const LogLevel m_level;
|
||||
const int m_line;
|
||||
const char *const m_file;
|
||||
const char *const m_func;
|
||||
template <typename T> inline LogStreamHelper& operator<<(const T& val);
|
||||
|
||||
private:
|
||||
std::ostringstream m_buffer;
|
||||
NGL::INGLLogger& m_logger;
|
||||
const LogLevel m_level;
|
||||
const int m_line;
|
||||
const char* const m_file;
|
||||
const char* const m_func;
|
||||
};
|
||||
|
||||
// Interface class for source code logging.
|
||||
@@ -64,58 +61,64 @@ private:
|
||||
// information on logger-hierarchies, logging-levels, and configuration files.
|
||||
class INGLLogger
|
||||
{
|
||||
public:
|
||||
INGLLogger(const INGLLogger &) = delete;
|
||||
INGLLogger &operator=(const INGLLogger &) = delete;
|
||||
INGLLogger() = default;
|
||||
virtual ~INGLLogger() = default;
|
||||
public:
|
||||
INGLLogger(const INGLLogger&) = delete;
|
||||
INGLLogger& operator=(const INGLLogger&) = delete;
|
||||
INGLLogger() = default;
|
||||
virtual ~INGLLogger() = default;
|
||||
|
||||
using String = std::string;
|
||||
using String = std::string;
|
||||
|
||||
// Creates an instance of an INGLLogger interface. The fullqualifiedname is
|
||||
// a dottet sequence (i.e. "NGL.thisandthat.mylogger"). The same name will
|
||||
// always return the same interface-instance. It is not required to create
|
||||
// the parent nodes.
|
||||
virtual INGLLogger &getNGLLogger(const char *fullqualifiedname) = 0;
|
||||
virtual INGLLogger &getNGLLogger(const std::string &fullqualifiedname) = 0;
|
||||
// Creates an instance of an INGLLogger interface. The fullqualifiedname is
|
||||
// a dottet sequence (i.e. "NGL.thisandthat.mylogger"). The same name will
|
||||
// always return the same interface-instance. It is not required to create
|
||||
// the parent nodes.
|
||||
virtual INGLLogger& getNGLLogger(const char* fullqualifiedname) = 0;
|
||||
virtual INGLLogger& getNGLLogger(const std::string& fullqualifiedname) = 0;
|
||||
|
||||
// True if this level is enabled.
|
||||
virtual bool isTraceEnabled() const = 0;
|
||||
virtual bool isDebugEnabled() const = 0;
|
||||
virtual bool isInfoEnabled() const = 0;
|
||||
virtual bool isWarningEnabled() const = 0;
|
||||
virtual bool isErrorEnabled() const = 0;
|
||||
virtual bool isFatalEnabled() const = 0;
|
||||
virtual bool isLevelEnabled(LogLevel level) const = 0;
|
||||
|
||||
// True if this level is enabled.
|
||||
virtual bool isTraceEnabled() const = 0;
|
||||
virtual bool isDebugEnabled() const = 0;
|
||||
virtual bool isInfoEnabled() const = 0;
|
||||
virtual bool isWarningEnabled() const = 0;
|
||||
virtual bool isErrorEnabled() const = 0;
|
||||
virtual bool isFatalEnabled() const = 0;
|
||||
virtual bool isLevelEnabled(LogLevel level) const = 0;
|
||||
// Submit a LOG message.
|
||||
// Use __FILE__ and __NAME__ macros.
|
||||
virtual void log(LogLevel level, const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
|
||||
// Submit a LOG message.
|
||||
// Use __FILE__ and __NAME__ macros.
|
||||
virtual void log(LogLevel level, const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Submit an TRACE message.
|
||||
virtual void logTrace(const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
// Submit an DEBUG message.
|
||||
virtual void logDebug(const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
// Submit an INFO message.
|
||||
virtual void logInfo(const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
// Submit a WARNING message.
|
||||
virtual void logWarning(const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
// Submit an ERROR message.
|
||||
virtual void logError(const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
// Submit a FATAL message.
|
||||
virtual void logFatal(const INGLLogger::String& message, const char* file = nullptr, int line = -1,
|
||||
const char* function = nullptr) = 0;
|
||||
|
||||
// Submit an TRACE message.
|
||||
virtual void logTrace(const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Submit an DEBUG message.
|
||||
virtual void logDebug(const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Submit an INFO message.
|
||||
virtual void logInfo(const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Submit a WARNING message.
|
||||
virtual void logWarning(const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Submit an ERROR message.
|
||||
virtual void logError(const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Submit a FATAL message.
|
||||
virtual void logFatal(const INGLLogger::String &message, const char *file = nullptr, int line = -1, const char *function = nullptr) = 0;
|
||||
// Writes a startup message into the logfile
|
||||
virtual void logStartup(const char* file, int line, const char* function = nullptr) = 0;
|
||||
// Writes a shutdown message into the logfile
|
||||
virtual void logShutdown(const char* file, int line, const char* function = nullptr) = 0;
|
||||
|
||||
// Writes a startup message into the logfile
|
||||
virtual void logStartup(const char *file, int line, const char *function = nullptr) = 0;
|
||||
// Writes a shutdown message into the logfile
|
||||
virtual void logShutdown(const char *file, int line, const char *function = nullptr) = 0;
|
||||
// Get this loggers fullqualified name.
|
||||
virtual std::string getLoggerName() const = 0;
|
||||
|
||||
// Get this loggers fullqualified name.
|
||||
virtual std::string getLoggerName() const = 0;
|
||||
|
||||
virtual void setNoSpace(bool bNoSpace) = 0;
|
||||
virtual bool noSpace() const = 0;
|
||||
virtual void setNoSpace(bool bNoSpace) = 0;
|
||||
virtual bool noSpace() const = 0;
|
||||
};
|
||||
|
||||
//
|
||||
@@ -123,112 +126,90 @@ public:
|
||||
//
|
||||
inline LogStreamHelper::~LogStreamHelper()
|
||||
{
|
||||
m_logger.log(m_level, m_buffer.str(), m_file, m_line, m_func);
|
||||
m_logger.log(m_level, m_buffer.str(), m_file, m_line, m_func);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline LogStreamHelper &LogStreamHelper::operator<<(const T &val)
|
||||
template <typename T> inline LogStreamHelper& LogStreamHelper::operator<<(const T& val)
|
||||
{
|
||||
m_buffer << val;
|
||||
if (!m_logger.noSpace())
|
||||
m_buffer << " ";
|
||||
return *this;
|
||||
m_buffer << val;
|
||||
if (!m_logger.noSpace())
|
||||
m_buffer << " ";
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace NGL
|
||||
|
||||
} //namespace NGL
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &stream, const QByteArray &str)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QByteArray& str)
|
||||
{
|
||||
stream << std::string(str.data(), str.size());
|
||||
return stream;
|
||||
stream << std::string(str.data(), str.size());
|
||||
return stream;
|
||||
}
|
||||
|
||||
//
|
||||
// operator to ease logging (at least via NglLogging)
|
||||
//
|
||||
inline std::ostream &operator<<(std::ostream &stream,
|
||||
const QPointF &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QPointF& value)
|
||||
{
|
||||
stream << "QPointF(" << QString::number(value.x(), 'f', 6).toStdString() << "#" << QString::number(value.y(), 'f', 6).toStdString() << ")";
|
||||
return stream;
|
||||
stream << "QPointF(" << QString::number(value.x(), 'f', 6).toStdString() << "#"
|
||||
<< QString::number(value.y(), 'f', 6).toStdString() << ")";
|
||||
return stream;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QPoint &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QPoint& value)
|
||||
{
|
||||
stream << "QPoint(" << value.x() << "#" << value.y() << ")";
|
||||
return stream;
|
||||
stream << "QPoint(" << value.x() << "#" << value.y() << ")";
|
||||
return stream;
|
||||
}
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QSize &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QSize& value)
|
||||
{
|
||||
stream << "QSize(w=" << value.width() << ";h=" << value.height() << ")";
|
||||
return stream;
|
||||
}
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QSizeF &value)
|
||||
{
|
||||
stream << "QSize(w="
|
||||
<< QString::number(value.width(), 'f', 6).toStdString() << ";h="
|
||||
<< QString::number(value.height(), 'f', 6).toStdString()
|
||||
<< ")";
|
||||
return stream;
|
||||
stream << "QSize(w=" << value.width() << ";h=" << value.height() << ")";
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QRect &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QSizeF& value)
|
||||
{
|
||||
stream << "QRect(center=" << value.center()
|
||||
<< " w=" << value.width()
|
||||
<< ";h=" << value.height()
|
||||
<< " bottomLeft=" << value.bottomLeft()
|
||||
<< " topRight=" << value.topRight()
|
||||
<< ")";
|
||||
return stream;
|
||||
stream << "QSize(w=" << QString::number(value.width(), 'f', 6).toStdString()
|
||||
<< ";h=" << QString::number(value.height(), 'f', 6).toStdString() << ")";
|
||||
return stream;
|
||||
}
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QRectF &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QRect& value)
|
||||
{
|
||||
stream << "QRectF(center=" << value.center()
|
||||
<< " w=" << QString::number(value.width(), 'f', 3).toStdString()
|
||||
<< ";h=" << QString::number(value.height(), 'f', 3).toStdString()
|
||||
<< " bottomLeft=" << value.bottomLeft()
|
||||
<< " topRight=" << value.topRight()
|
||||
<< ")";
|
||||
return stream;
|
||||
stream << "QRect(center=" << value.center() << " w=" << value.width() << ";h=" << value.height()
|
||||
<< " bottomLeft=" << value.bottomLeft() << " topRight=" << value.topRight() << ")";
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QList<int> &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QRectF& value)
|
||||
{
|
||||
stream << "QList<int>(" << value.size() << "): ";
|
||||
for (int i : value)
|
||||
stream << i << ";";
|
||||
return stream;
|
||||
stream << "QRectF(center=" << value.center() << " w=" << QString::number(value.width(), 'f', 3).toStdString()
|
||||
<< ";h=" << QString::number(value.height(), 'f', 3).toStdString() << " bottomLeft=" << value.bottomLeft()
|
||||
<< " topRight=" << value.topRight() << ")";
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream,
|
||||
const QList<QPointF> &value)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QList<int>& value)
|
||||
{
|
||||
stream << "QList<QPointF>(" << value.size() << "): ";
|
||||
for (const QPointF &item : value)
|
||||
stream << item << ";";
|
||||
return stream;
|
||||
stream << "QList<int>(" << value.size() << "): ";
|
||||
for (int i : value)
|
||||
stream << i << ";";
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &stream, const QString &str)
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QList<QPointF>& value)
|
||||
{
|
||||
return stream << str.toUtf8();
|
||||
stream << "QList<QPointF>(" << value.size() << "): ";
|
||||
for (const QPointF& item : value)
|
||||
stream << item << ";";
|
||||
return stream;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& stream, const QString& str)
|
||||
{
|
||||
return stream << str.toUtf8();
|
||||
}
|
||||
|
||||
namespace NGL
|
||||
@@ -236,15 +217,12 @@ namespace NGL
|
||||
|
||||
namespace NGLLoggerHelper
|
||||
{
|
||||
NGLLOGGER_EXPORT void hexDumpHelper(NGL::INGLLogger &logger,
|
||||
NGL::LogLevel level,
|
||||
const void *a_data,
|
||||
NGLLOGGER_EXPORT void hexDumpHelper(NGL::INGLLogger& logger, NGL::LogLevel level, const void* a_data,
|
||||
const unsigned int a_size);
|
||||
inline void hexDumpHelper(NGL::INGLLogger &logger,
|
||||
NGL::LogLevel level,
|
||||
const QByteArray &data)
|
||||
|
||||
inline void hexDumpHelper(NGL::INGLLogger& logger, NGL::LogLevel level, const QByteArray& data)
|
||||
{
|
||||
return hexDumpHelper(logger, level, data.data(), data.size());
|
||||
return hexDumpHelper(logger, level, data.data(), data.size());
|
||||
}
|
||||
} // namespace NGLLoggerHelper
|
||||
|
||||
@@ -260,41 +238,46 @@ NGLLOGGER_EXPORT std::string getMemoryData();
|
||||
#define LOGFUNCTION Q_FUNC_INFO
|
||||
|
||||
// log this output every time, no matter what log level is enabled
|
||||
#define NOTICE_LOG(logger) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Info, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define NOTICE_LOG(logger) NGL::LogStreamHelper(logger, NGL::LogLevel::Info, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
#define TRACE_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isTraceEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Trace, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define TRACE_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isTraceEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Trace, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
#else
|
||||
#define TRACE_LOG(logger) \
|
||||
for ( ; false; ) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Trace, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define TRACE_LOG(logger) \
|
||||
for (; false;) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Trace, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
#endif
|
||||
|
||||
#define DEBUG_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isDebugEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Debug, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define DEBUG_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isDebugEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Debug, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
|
||||
#define INFO_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isInfoEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Info, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define INFO_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isInfoEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Info, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
|
||||
#define WARNING_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isWarningEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Warning, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define WARNING_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isWarningEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Warning, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
|
||||
#define ERROR_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isErrorEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Error, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define ERROR_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isErrorEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Error, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
|
||||
#define FATAL_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isFatalEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Fatal, __FILE__,__LINE__, Q_FUNC_INFO)
|
||||
#define FATAL_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger).isFatalEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(logger, NGL::LogLevel::Fatal, __FILE__, __LINE__, Q_FUNC_INFO)
|
||||
|
||||
#define STARTUP_LOG(logger) { (logger).logStartup(__FILE__, __LINE__, Q_FUNC_INFO); }
|
||||
#define SHUTDOWN_LOG(logger) { (logger).logShutdown(__FILE__, __LINE__, Q_FUNC_INFO); }
|
||||
#define STARTUP_LOG(logger) \
|
||||
{ \
|
||||
(logger).logStartup(__FILE__, __LINE__, Q_FUNC_INFO); \
|
||||
}
|
||||
#define SHUTDOWN_LOG(logger) \
|
||||
{ \
|
||||
(logger).logShutdown(__FILE__, __LINE__, Q_FUNC_INFO); \
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
@@ -303,8 +286,10 @@ NGLLOGGER_EXPORT std::string getMemoryData();
|
||||
// do something nasty
|
||||
// MEMORY_LOG() << " after something nasty";
|
||||
|
||||
#define MEMORY_LOG() \
|
||||
for (bool log_level_enabled = (NGL::getMemoryLogger()).isInfoEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(NGL::getMemoryLogger(), NGL::LogLevel::Info, __FILE__,__LINE__, Q_FUNC_INFO) << NGL::getMemoryData()
|
||||
#define MEMORY_LOG() \
|
||||
for (bool log_level_enabled = (NGL::getMemoryLogger()).isInfoEnabled(); log_level_enabled; \
|
||||
log_level_enabled = false) \
|
||||
NGL::LogStreamHelper(NGL::getMemoryLogger(), NGL::LogLevel::Info, __FILE__, __LINE__, Q_FUNC_INFO) \
|
||||
<< NGL::getMemoryData()
|
||||
|
||||
//==============================================================================
|
||||
Reference in new issue
Block a user