Commit d84ae26b authored by Ronan Abhamon's avatar Ronan Abhamon

fix(Logger): add a workaround to keep a ref on logging service

parent a4ad61d3
......@@ -196,7 +196,7 @@ void Logger::init (const shared_ptr<linphone::Config> &config) {
qInstallMessageHandler(Logger::log);
{
shared_ptr<linphone::LoggingService> loggingService = linphone::LoggingService::get();
shared_ptr<linphone::LoggingService> loggingService = mInstance->mLoggingService = linphone::LoggingService::get();
loggingService->setLogLevel(linphone::LogLevel::LogLevelMessage);
loggingService->setListener(make_shared<LinphoneLogger>(mInstance));
}
......
......@@ -57,6 +57,8 @@ private:
static QMutex mMutex;
static Logger *mInstance;
std::shared_ptr<linphone::LoggingService> mLoggingService;
};
#endif // LOGGER_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment