summaryrefslogtreecommitdiffstats
path: root/logger
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-17 02:09:58 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-20 23:04:11 +0100
commitd6c71488b34a2854461feee3296c11568542ecbe (patch)
tree9486ced2bfb437178d1abe827dc29f00edd7783d /logger
parent20e86801b3cc889a07cd8eef744b06b77a2239cc (diff)
downloadMultiMC-d6c71488b34a2854461feee3296c11568542ecbe.tar
MultiMC-d6c71488b34a2854461feee3296c11568542ecbe.tar.gz
MultiMC-d6c71488b34a2854461feee3296c11568542ecbe.tar.lz
MultiMC-d6c71488b34a2854461feee3296c11568542ecbe.tar.xz
MultiMC-d6c71488b34a2854461feee3296c11568542ecbe.zip
Some test madness
Diffstat (limited to 'logger')
-rw-r--r--logger/QsLogDest.cpp14
-rw-r--r--logger/QsLogDest.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/logger/QsLogDest.cpp b/logger/QsLogDest.cpp
index 2fd29b23..4a47060e 100644
--- a/logger/QsLogDest.cpp
+++ b/logger/QsLogDest.cpp
@@ -77,6 +77,15 @@ void DebugOutputDestination::write(const QString &message)
QsDebugOutput::output(message);
}
+class QDebugDestination : public Destination
+{
+public:
+ virtual void write(const QString &message)
+ {
+ qDebug() << message;
+ };
+};
+
DestinationPtr DestinationFactory::MakeFileDestination(const QString &filePath)
{
return DestinationPtr(new FileDestination(filePath));
@@ -87,4 +96,9 @@ DestinationPtr DestinationFactory::MakeDebugOutputDestination()
return DestinationPtr(new DebugOutputDestination);
}
+DestinationPtr DestinationFactory::MakeQDebugDestination()
+{
+ return DestinationPtr(new QDebugDestination);
+}
+
} // end namespace
diff --git a/logger/QsLogDest.h b/logger/QsLogDest.h
index e7fcc045..a8000022 100644
--- a/logger/QsLogDest.h
+++ b/logger/QsLogDest.h
@@ -47,6 +47,7 @@ class DestinationFactory
public:
static DestinationPtr MakeFileDestination(const QString &filePath);
static DestinationPtr MakeDebugOutputDestination();
+ static DestinationPtr MakeQDebugDestination();
};
} // end namespace