[libcalamares] Reduce log-spam in emergencies
- when an emergency strikes, log the modules that are skipped with a Once, but if an emergency module runs, refresh that Once so that the function header is printed again -- to distinguish JobQueue debugging from the logging from the emergency module.
This commit is contained in:
parent
9be9431970
commit
db26df311d
@ -112,17 +112,19 @@ public:
|
||||
QString message; ///< Filled in with errors
|
||||
QString details;
|
||||
|
||||
Logger::Once o;
|
||||
m_jobIndex = 0;
|
||||
for ( const auto& jobitem : *m_runningJobs )
|
||||
{
|
||||
if ( failureEncountered && !jobitem.job->isEmergency() )
|
||||
{
|
||||
cDebug() << "Skipping non-emergency job" << jobitem.job->prettyName();
|
||||
cDebug() << o << "Skipping non-emergency job" << jobitem.job->prettyName();
|
||||
}
|
||||
else
|
||||
{
|
||||
cDebug() << "Starting" << ( failureEncountered ? "EMERGENCY JOB" : "job" ) << jobitem.job->prettyName()
|
||||
cDebug() << o << "Starting" << ( failureEncountered ? "EMERGENCY JOB" : "job" ) << jobitem.job->prettyName()
|
||||
<< '(' << ( m_jobIndex + 1 ) << '/' << m_runningJobs->count() << ')';
|
||||
o.refresh(); // So next time it shows the function header again
|
||||
emitProgress( 0.0 ); // 0% for *this job*
|
||||
connect( jobitem.job.data(), &Job::progress, this, &JobThread::emitProgress );
|
||||
auto result = jobitem.job->exec();
|
||||
|
Loading…
Reference in New Issue
Block a user