Commit 2cd5010a authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Qbs: Allow for tweaking of Qbs log level via environment

Set QBS_LOG_LEVEL to any number, the higher the more messages you
will get.

Change-Id: I6ae0d3a5bb94ad6865cd57d9ff381d36c8c8e95e
Reviewed-by: default avatarTobias Hunger <>
parent 5ed1f715
......@@ -83,7 +83,17 @@ QbsManager::QbsManager(Internal::QbsProjectManagerPlugin *plugin) :
connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitsChanged()), this, SLOT(pushKitsToQbs()));
qbs::Logger::instance().setLogSink(new Internal::QbsLogSink);
int level = qbs::LoggerWarning;
const QString levelEnv = QString::fromLocal8Bit(qgetenv("QBS_LOG_LEVEL"));
if (!levelEnv.isEmpty()) {
int tmp = levelEnv.toInt();
if (tmp < static_cast<int>(qbs::LoggerMinLevel))
tmp = static_cast<int>(qbs::LoggerMinLevel);
if (tmp > static_cast<int>(qbs::LoggerMaxLevel))
tmp = static_cast<int>(qbs::LoggerMaxLevel);
level = tmp;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment