Commit 7b7ad00a authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/app/logger/Logger): set `linphone` domain by default in linphone handler

parent 2f833894
...@@ -89,7 +89,7 @@ static void linphoneLog (const char *domain, OrtpLogLevel type, const char *fmt, ...@@ -89,7 +89,7 @@ static void linphoneLog (const char *domain, OrtpLogLevel type, const char *fmt,
QByteArray dateTime = getFormattedCurrentTime(); QByteArray dateTime = getFormattedCurrentTime();
char *msg = bctbx_strdup_vprintf(fmt, args); char *msg = bctbx_strdup_vprintf(fmt, args);
fprintf(stderr, format, dateTime.constData(), domain, msg); fprintf(stderr, format, dateTime.constData(), domain ? domain : "linphone", msg);
bctbx_free(msg); bctbx_free(msg);
...@@ -163,12 +163,10 @@ void Logger::init () { ...@@ -163,12 +163,10 @@ void Logger::init () {
qInstallMessageHandler(Logger::log); qInstallMessageHandler(Logger::log);
linphone_core_set_log_level(ORTP_MESSAGE); linphone_core_set_log_level(ORTP_MESSAGE);
linphone_core_set_log_handler( linphone_core_set_log_handler([](const char *domain, OrtpLogLevel type, const char *fmt, va_list args) {
[](const char *domain, OrtpLogLevel type, const char *fmt, va_list args) {
if (mInstance->isVerbose()) if (mInstance->isVerbose())
linphoneLog(domain, type, fmt, args); linphoneLog(domain, type, fmt, args);
} });
);
linphone_core_set_log_collection_path(Paths::getLogsDirPath().c_str()); linphone_core_set_log_collection_path(Paths::getLogsDirPath().c_str());
linphone_core_set_log_collection_max_file_size(MAX_LOGS_COLLECTION_SIZE); linphone_core_set_log_collection_max_file_size(MAX_LOGS_COLLECTION_SIZE);
......
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