[libcalamares] Log Q_FUNC_INFO as part of debug

- Warnings, errors, don't get funcinfo, but regular cDebug()
  calls do. Other special-cases, like calling Logger::CDebug()
  constructor explicitly, don't get funcinfo either.

FIXES #1328
This commit is contained in:
Adriaan de Groot 2020-02-27 13:20:19 +01:00
parent 3456aabfce
commit f818d4b446
4 changed files with 14 additions and 14 deletions

View File

@ -99,8 +99,8 @@ CalamaresApplication::init()
CalamaresApplication::~CalamaresApplication() CalamaresApplication::~CalamaresApplication()
{ {
cDebug( Logger::LOGVERBOSE ) << "Shutting down Calamares..."; Logger::CDebug( Logger::LOGVERBOSE ) << "Shutting down Calamares...";
cDebug( Logger::LOGVERBOSE ) << Logger::SubEntry << "Finished shutdown."; Logger::CDebug( Logger::LOGVERBOSE ) << Logger::SubEntry << "Finished shutdown.";
} }

View File

@ -125,9 +125,9 @@ private:
if ( m_jobIndex < jobCount ) if ( m_jobIndex < jobCount )
{ {
cDebug( Logger::LOGVERBOSE ) << "[JOBQUEUE]: Progress for Job[" << m_jobIndex Logger::CDebug( Logger::LOGVERBOSE ) << "[JOBQUEUE]: Progress for Job[" << m_jobIndex
<< "]: " << ( jobPercent * 100 ) << "% completed"; << "]: " << ( jobPercent * 100 ) << "% completed";
cDebug( Logger::LOGVERBOSE ) << "[JOBQUEUE]: Progress Overall: " << ( cumulativeProgress * 100 ) Logger::CDebug( Logger::LOGVERBOSE ) << "[JOBQUEUE]: Progress Overall: " << ( cumulativeProgress * 100 )
<< "% (accumulated) + " << "% (accumulated) + "
<< ( ( ( m_jobWeights.at( m_jobIndex ) ) * jobPercent ) * 100 ) << ( ( ( m_jobWeights.at( m_jobIndex ) ) * jobPercent ) * 100 )
<< "% (this job) = " << ( percent * 100 ) << "% (total)"; << "% (this job) = " << ( percent * 100 ) << "% (total)";

View File

@ -219,7 +219,7 @@ operator<<( QDebug& s, const DebugMap& t )
} }
} // namespace Logger } // namespace Logger
#define cDebug Logger::CDebug #define cDebug() (Logger::CDebug( Logger::LOGDEBUG ) << Q_FUNC_INFO << Logger::Continuation)
#define cWarning() Logger::CDebug( Logger::LOGWARNING ) #define cWarning() Logger::CDebug( Logger::LOGWARNING )
#define cError() Logger::CDebug( Logger::LOGERROR ) #define cError() Logger::CDebug( Logger::LOGERROR )

View File

@ -69,7 +69,7 @@ CreatePartitionTableJob::prettyStatusMessage() const
static inline QDebug& static inline QDebug&
operator <<( QDebug&& s, PartitionIterator& it ) operator <<( QDebug& s, PartitionIterator& it )
{ {
s << ( ( *it ) ? ( *it )->deviceNode() : QString( "<null device>" ) ); s << ( ( *it ) ? ( *it )->deviceNode() : QString( "<null device>" ) );
return s; return s;