diff --git a/AdaptiveBrightness/log_to_file.hpp b/AdaptiveBrightness/log_to_file.hpp index dad648c..3230115 100644 --- a/AdaptiveBrightness/log_to_file.hpp +++ b/AdaptiveBrightness/log_to_file.hpp @@ -31,12 +31,13 @@ void logToFile(QtMsgType msgType, const QMessageLogContext& msgContext, const QS break; } +#ifdef LOG_SOURCE_LOCATION const auto msgFromFile = QString(msgContext.file); const auto msgFromLine = (msgContext.line == 0) ? QString("") : QString("%1").arg(msgContext.line); - if(!msgFromFile.isEmpty() && !msgFromLine.isEmpty()) { formattedMsg += QString("[%1:%2] ").arg(msgContext.file).arg(msgContext.line); } +#endif #ifdef LOG_FUNCTION_LOCATION const auto msgFromFunction = QString(msgContext.function);