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 f3f5975..dbd5952 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
@@ -122,4 +124,16 @@ bool State::commandTiming() const
122 return d->timing; 124 return d->timing;
123} 125}
124 126
127void State::setLoggingLevel(const QString &level) const
128{
129 Akonadi2::Log::setDebugOutputLevel(Akonadi2::Log::debugLevelFromName(level.toLatin1()));
130}
131
132QString State::loggingLevel() const
133{
134 // do not turn this into a single line return: that core dumps due to allocation of
135 // the byte array in Akonadi2::Log
136 QByteArray rv = Akonadi2::Log::debugLevelName(Akonadi2::Log::debugOutputLevel());
137 return rv.toLower();
138}
125 139