mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
[libcalamares] Factor out common string in Python logging
- enforce consistent [PYTHON JOB] - use CDebug() constructor, because the convenience macro's introduce the function name -- that's the C++ function, so it isn't useful for logging.
This commit is contained in:
parent
fc2286117d
commit
3596b48c7a
1 changed files with 4 additions and 3 deletions
|
@ -136,16 +136,18 @@ check_target_env_output( const bp::list& args, const std::string& stdin, int tim
|
|||
return ec.second.toStdString();
|
||||
}
|
||||
|
||||
static const char output_prefix[] = "[PYTHON JOB]:";
|
||||
|
||||
void
|
||||
debug( const std::string& s )
|
||||
{
|
||||
Logger::CDebug( Logger::LOGDEBUG ) << "[PYTHON JOB]: " << QString::fromStdString( s );
|
||||
Logger::CDebug( Logger::LOGDEBUG ) << output_prefix << QString::fromStdString( s );
|
||||
}
|
||||
|
||||
void
|
||||
warning( const std::string& s )
|
||||
{
|
||||
cWarning() << "[PYTHON JOB]: " << QString::fromStdString( s );
|
||||
Logger::CDebug( Logger::LOGWARNING ) << output_prefix << QString::fromStdString( s );
|
||||
}
|
||||
|
||||
PythonJobInterface::PythonJobInterface( Calamares::PythonJob* parent )
|
||||
|
@ -168,7 +170,6 @@ PythonJobInterface::setprogress( qreal progress )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
std::string
|
||||
obscure( const std::string& string )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue