[calamares]: Improve startup logging
- Don't bother with the address of the main thread - Do put a marker on restart into the log file - Do put the Calamares version into the log file (previously, the version was printed through cDebug() before the log file was opened, so it was lost to the on-disk log).
This commit is contained in:
parent
24305bd58f
commit
0f289e2552
@ -65,9 +65,6 @@ CalamaresApplication::CalamaresApplication( int& argc, char* argv[] )
|
|||||||
void
|
void
|
||||||
CalamaresApplication::init()
|
CalamaresApplication::init()
|
||||||
{
|
{
|
||||||
cDebug() << "CalamaresApplication thread:" << thread();
|
|
||||||
|
|
||||||
//TODO: Icon loader
|
|
||||||
Logger::setupLogfile();
|
Logger::setupLogfile();
|
||||||
|
|
||||||
setQuitOnLastWindowClosed( false );
|
setQuitOnLastWindowClosed( false );
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
#include "utils/CalamaresUtils.h"
|
#include "utils/CalamaresUtils.h"
|
||||||
|
#include "CalamaresVersion.h"
|
||||||
|
|
||||||
#define LOGFILE_SIZE 1024 * 256
|
#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();
|
cDebug() << "Using log file:" << logFile();
|
||||||
|
|
||||||
|
// Lock while (re-)opening the logfile
|
||||||
|
{
|
||||||
|
QMutexLocker lock( &s_mutex );
|
||||||
logfile.open( logFile().toLocal8Bit(), std::ios::app );
|
logfile.open( logFile().toLocal8Bit(), std::ios::app );
|
||||||
|
if ( logfile.tellp() )
|
||||||
|
logfile << "\n\n" << std::endl;
|
||||||
|
logfile << "=== START CALAMARES " << CALAMARES_VERSION << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
qInstallMessageHandler( CalamaresLogHandler );
|
qInstallMessageHandler( CalamaresLogHandler );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user