mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-27 08:49:19 +00:00
Add QT domain to the logger
Redirect logs in stdout
This commit is contained in:
parent
2629e2461d
commit
52505f040c
1 changed files with 2 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ void Logger::log (QtMsgType type, const QMessageLogContext &context, const QStri
|
|||
|
||||
mMutex.lock();
|
||||
|
||||
fprintf(stderr, format, dateTime.constData(), QThread::currentThread(), contextStr, localMsg.constData());
|
||||
fprintf(stdout, format, dateTime.constData(), QThread::currentThread(), contextStr, localMsg.constData());
|
||||
if( level == BCTBX_LOG_FATAL)
|
||||
QMessageBox::critical(nullptr, "Linphone will crash", msg); // Print an error message before sending msg to bctoolbox
|
||||
bctbx_log(QtDomain, level, "QT: %s%s", contextStr, localMsg.constData());
|
||||
|
|
@ -202,6 +202,7 @@ void Logger::init (const shared_ptr<linphone::Config> &config) {
|
|||
|
||||
{
|
||||
shared_ptr<linphone::LoggingService> loggingService = mInstance->mLoggingService = linphone::LoggingService::get();
|
||||
loggingService->setDomain(QtDomain);
|
||||
loggingService->setLogLevel(linphone::LogLevel::Message);
|
||||
loggingService->addListener(make_shared<LinphoneLogger>(mInstance));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue