[welcome] Improve logging of requirements-checking
- less chatty when 0-results come in - compress the welcome debug to one output chunk
This commit is contained in:
parent
f8afb15c4c
commit
33fec86ef6
@ -85,9 +85,9 @@ void
|
||||
RequirementsChecker::addCheckedRequirements( Module* m )
|
||||
{
|
||||
RequirementsList l = m->checkRequirements();
|
||||
cDebug() << "Got" << l.count() << "requirement results from" << m->name();
|
||||
if ( l.count() > 0 )
|
||||
{
|
||||
cDebug() << "Got" << l.count() << "requirement results from" << m->name();
|
||||
m_model->addRequirementsList( l );
|
||||
}
|
||||
|
||||
|
@ -107,14 +107,12 @@ GeneralRequirements::checkRequirements()
|
||||
&& ( availableSize.height() >= CalamaresUtils::windowMinimumHeight );
|
||||
|
||||
qint64 requiredStorageB = CalamaresUtils::GiBtoBytes( m_requiredStorageGiB );
|
||||
cDebug() << "Need at least storage bytes:" << requiredStorageB;
|
||||
if ( m_entriesToCheck.contains( "storage" ) )
|
||||
{
|
||||
enoughStorage = checkEnoughStorage( requiredStorageB );
|
||||
}
|
||||
|
||||
qint64 requiredRamB = CalamaresUtils::GiBtoBytes( m_requiredRamGiB );
|
||||
cDebug() << "Need at least ram bytes:" << requiredRamB;
|
||||
if ( m_entriesToCheck.contains( "ram" ) )
|
||||
{
|
||||
enoughRam = checkEnoughRam( requiredRamB );
|
||||
@ -135,10 +133,18 @@ GeneralRequirements::checkRequirements()
|
||||
isRoot = checkIsRoot();
|
||||
}
|
||||
|
||||
using TNum = Logger::DebugRow< const char*, qint64 >;
|
||||
using TR = Logger::DebugRow< const char*, MaybeChecked >;
|
||||
cDebug() << "GeneralRequirements output:" << TR( "enoughStorage", enoughStorage ) << TR( "enoughRam", enoughRam )
|
||||
<< TR( "hasPower", hasPower ) << TR( "hasInternet", hasInternet ) << TR( "isRoot", isRoot );
|
||||
|
||||
// clang-format off
|
||||
cDebug() << "GeneralRequirements output:"
|
||||
<< TNum( "storage", requiredStorageB )
|
||||
<< TR( "enoughStorage", enoughStorage )
|
||||
<< TNum( "RAM", requiredRamB )
|
||||
<< TR( "enoughRam", enoughRam )
|
||||
<< TR( "hasPower", hasPower )
|
||||
<< TR( "hasInternet", hasInternet )
|
||||
<< TR( "isRoot", isRoot );
|
||||
// clang-format on
|
||||
Calamares::RequirementsList checkEntries;
|
||||
foreach ( const QString& entry, m_entriesToCheck )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user