diff --git a/src/main/cpp/logger.cpp b/src/main/cpp/logger.cpp index bab57857f..cd884cfc2 100644 --- a/src/main/cpp/logger.cpp +++ b/src/main/cpp/logger.cpp @@ -1192,7 +1192,7 @@ void Logger::warn(const CFStringRef& msg) const #endif #if LOG4CXX_QSTRING_API -void Logger::addEvent(const LevelPtr& level, QString&& message, const LocationInfo& location) const +void Logger::addEvent(const LevelPtr& level, QString& message, const LocationInfo& location) const { if (!getHierarchy()) // Has removeHierarchy() been called? return; diff --git a/src/main/include/log4cxx/logger.h b/src/main/include/log4cxx/logger.h index b69225577..b1fb399e9 100644 --- a/src/main/include/log4cxx/logger.h +++ b/src/main/include/log4cxx/logger.h @@ -649,6 +649,17 @@ class LOG4CXX_EXPORT Logger : @param message The text to add to the logging event. */ void forcedLog(const LevelPtr& level, const CFStringRef& message) const; +#endif +#if LOG4CXX_QSTRING_API + /** + Add a new logging event containing \c message and \c location to attached appender(s). + without further checks. + @param level The logging event level. + @param message The text to add to the logging event. + @param location The source code location of the logging request. + */ + void addEvent(const LevelPtr& level, QString& message, + const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const; #endif /** Add a new logging event containing \c message and \c location to attached appender(s).