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.
This commit is contained in:
@ -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__
|
||||
*/
|
||||
*/
|
||||
|
Reference in New Issue
Block a user