summaryrefslogtreecommitdiffstats
path: root/akonadish/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'akonadish/state.cpp')
-rw-r--r--akonadish/state.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/akonadish/state.cpp b/akonadish/state.cpp
index 85cbe10..9fb5bcc 100644
--- a/akonadish/state.cpp
+++ b/akonadish/state.cpp
@@ -24,6 +24,8 @@
24#include <QEventLoop> 24#include <QEventLoop>
25#include <QTextStream> 25#include <QTextStream>
26 26
27#include "common/log.h"
28
27static bool s_hasEventLoop = false; 29static bool s_hasEventLoop = false;
28 30
29class State::Private 31class State::Private
@@ -127,4 +129,16 @@ bool State::commandTiming() const
127 return d->timing; 129 return d->timing;
128} 130}
129 131
132void State::setLoggingLevel(const QString &level) const
133{
134 Akonadi2::Log::setDebugOutputLevel(Akonadi2::Log::debugLevelFromName(level.toLatin1()));
135}
136
137QString State::loggingLevel() const
138{
139 // do not turn this into a single line return: that core dumps due to allocation of
140 // the byte array in Akonadi2::Log
141 QByteArray rv = Akonadi2::Log::debugLevelName(Akonadi2::Log::debugOutputLevel());
142 return rv.toLower();
143}
130 144