From ded91614ab3713d443d8d8d7db2edadb17e3f5cb Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sat, 5 Jun 2021 12:29:47 +0100 Subject: [PATCH] simgear/debug/logstream.cxx: enable file:line on startup if SG_LOG_FILE_LINE is 1. E.g. allows file:line in diagnostics when running test-suite. --- simgear/debug/logstream.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simgear/debug/logstream.cxx b/simgear/debug/logstream.cxx index 36b5650c..cb7881e3 100644 --- a/simgear/debug/logstream.cxx +++ b/simgear/debug/logstream.cxx @@ -299,6 +299,10 @@ public: m_consoleCallbacks.push_back(m_callbacks.back()); } #endif + const char* fl = getenv("SG_LOG_FILE_LINE"); + if (fl && !strcmp(fl, "1")) { + m_fileLine = true; + } } ~LogStreamPrivate()