diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-17 02:09:58 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-20 23:04:11 +0100 |
commit | d6c71488b34a2854461feee3296c11568542ecbe (patch) | |
tree | 9486ced2bfb437178d1abe827dc29f00edd7783d /logger | |
parent | 20e86801b3cc889a07cd8eef744b06b77a2239cc (diff) | |
download | MultiMC-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.cpp | 14 | ||||
-rw-r--r-- | logger/QsLogDest.h | 1 |
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 |