mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-23 01:08:30 +00:00
fix(src/app/logger/Logger): set linphone domain by default in linphone handler
This commit is contained in:
parent
2f833894bb
commit
7b7ad00a2b
1 changed files with 3 additions and 5 deletions
|
|
@ -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 () {
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue