From c5c970d1779aa7060c0bd5c9f169142d311f273e Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Thu, 15 Jan 2026 17:45:32 +0100 Subject: [PATCH] Fix logging in app extension --- Linphone/Core/CoreContext.swift | 2 +- Linphone/GeneratedGit.swift | 2 +- Linphone/Utils/Log.swift | 2 +- msgNotificationService/NotificationService.swift | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index f2905531e..6ee639663 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -123,7 +123,7 @@ class CoreContext: ObservableObject { coreQueue.async { LoggingService.Instance.logLevel = LogLevel.Debug - Factory.Instance.logCollectionPath = Factory.Instance.getConfigDir(context: nil) + Factory.Instance.logCollectionPath = Factory.Instance.getDataDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String)) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled) Log.info("Checking if linphonerc file exists already. If not, creating one as a copy of linphonerc-default") diff --git a/Linphone/GeneratedGit.swift b/Linphone/GeneratedGit.swift index 1df3e3179..5658e01ad 100644 --- a/Linphone/GeneratedGit.swift +++ b/Linphone/GeneratedGit.swift @@ -2,6 +2,6 @@ import Foundation public enum AppGitInfo { public static let branch = "master" - public static let commit = "aed687606" + public static let commit = "986276c04" public static let tag = "6.1.0-alpha" } diff --git a/Linphone/Utils/Log.swift b/Linphone/Utils/Log.swift index e23bf81ab..d09da8240 100644 --- a/Linphone/Utils/Log.swift +++ b/Linphone/Utils/Log.swift @@ -37,7 +37,7 @@ class Log: LoggingServiceDelegate { private init() { service.domain = Bundle.main.bundleIdentifier! - Core.setLogCollectionPath(path: Factory.Instance.getDownloadDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String))) + Core.setLogCollectionPath(path: Factory.Instance.getDataDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String))) Core.enableLogCollection(state: LogCollectionState.Enabled) setMask() LoggingService.Instance.addDelegate(delegate: self) diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index f36c6406d..806542b62 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -87,8 +87,9 @@ class NotificationService: UNNotificationServiceExtension { bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) LoggingService.Instance.logLevel = LogLevel.Debug - Factory.Instance.logCollectionPath = Factory.Instance.getConfigDir(context: nil) + Factory.Instance.logCollectionPath = Factory.Instance.getDataDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String)) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled) + Log.info("[msgNotificationService] start msgNotificationService extension") /* if (VFSUtil.vfsEnabled(groupName: Config.appGroupName) && !VFSUtil.activateVFS()) {