summaryrefslogtreecommitdiffstats
path: root/logger/QsLog.h
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-11 13:17:23 -0600
committerAndrew <forkk@forkk.net>2013-12-11 13:17:23 -0600
commitf3fffd52594065995d4c355de1571b36b2f2bbeb (patch)
treecb9654d8ba5449d0e0ec1113a8ad1b739b73a1c4 /logger/QsLog.h
parent35ec5997308ec48f45c3a8d6483bc83dc1c1ef09 (diff)
downloadMultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar.gz
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar.lz
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar.xz
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.zip
Remove QsLog destinations when they are destroyed.
This fixes some issues where MultiMC was segfaulting on exit because things were trying to write to the logger while they were being destroyed, but the destinations had already been destroyed and were left in the list.
Diffstat (limited to 'logger/QsLog.h')
-rw-r--r--logger/QsLog.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/logger/QsLog.h b/logger/QsLog.h
index a18c08de..6c96423c 100644
--- a/logger/QsLog.h
+++ b/logger/QsLog.h
@@ -54,6 +54,8 @@ public:
//! Adds a log message destination. Don't add null destinations.
void addDestination(Destination *destination);
+ //! Removes the given destination from the logger.
+ void removeDestination(Destination* destination);
//! Logging at a level < 'newLevel' will be ignored
void setLoggingLevel(Level newLevel);
//! The default level is INFO
@@ -127,4 +129,4 @@ private:
QsLogging::Logger::Helper(QsLogging::ErrorLevel).stream() << __FILE__ << '@' << __LINE__
#define QLOG_FATAL() \
QsLogging::Logger::Helper(QsLogging::FatalLevel).stream() << __FILE__ << '@' << __LINE__
-*/ \ No newline at end of file
+*/