Fix logging in app extension

This commit is contained in:
Benoit Martins 2026-01-15 17:45:32 +01:00 committed by QuentinA
parent b4432fcb5c
commit 1d3e6489d3
3 changed files with 4 additions and 3 deletions

View file

@ -121,7 +121,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<Int8>(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")

View file

@ -37,7 +37,7 @@ class Log: LoggingServiceDelegate {
private init() {
service.domain = Bundle.main.bundleIdentifier!
Core.setLogCollectionPath(path: Factory.Instance.getDownloadDir(context: UnsafeMutablePointer<Int8>(mutating: (Config.appGroupName as NSString).utf8String)))
Core.setLogCollectionPath(path: Factory.Instance.getDataDir(context: UnsafeMutablePointer<Int8>(mutating: (Config.appGroupName as NSString).utf8String)))
Core.enableLogCollection(state: LogCollectionState.Enabled)
setMask()
LoggingService.Instance.addDelegate(delegate: self)

View file

@ -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<Int8>(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()) {