diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index f606bb78b..601f6b388 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -65,9 +65,6 @@ CalamaresApplication::CalamaresApplication( int& argc, char* argv[] ) void CalamaresApplication::init() { - cDebug() << "CalamaresApplication thread:" << thread(); - - //TODO: Icon loader Logger::setupLogfile(); setQuitOnLastWindowClosed( false ); diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index fe95ad36b..85a05d22b 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -31,6 +31,7 @@ #include #include "utils/CalamaresUtils.h" +#include "CalamaresVersion.h" #define LOGFILE_SIZE 1024 * 256 @@ -145,9 +146,18 @@ setupLogfile() } } + // Since the log isn't open yet, this probably only goes to stdout cDebug() << "Using log file:" << logFile(); + // Lock while (re-)opening the logfile + { + QMutexLocker lock( &s_mutex ); logfile.open( logFile().toLocal8Bit(), std::ios::app ); + if ( logfile.tellp() ) + logfile << "\n\n" << std::endl; + logfile << "=== START CALAMARES " << CALAMARES_VERSION << std::endl; + } + qInstallMessageHandler( CalamaresLogHandler ); }