Fix logging in app extension

This commit is contained in:
Benoit Martins 2026-01-15 17:45:32 +01:00
parent 986276c04f
commit c5c970d177
4 changed files with 5 additions and 4 deletions

View file

@ -123,7 +123,7 @@ class CoreContext: ObservableObject {
coreQueue.async { coreQueue.async {
LoggingService.Instance.logLevel = LogLevel.Debug 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) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled)
Log.info("Checking if linphonerc file exists already. If not, creating one as a copy of linphonerc-default") Log.info("Checking if linphonerc file exists already. If not, creating one as a copy of linphonerc-default")

View file

@ -2,6 +2,6 @@ import Foundation
public enum AppGitInfo { public enum AppGitInfo {
public static let branch = "master" public static let branch = "master"
public static let commit = "aed687606" public static let commit = "986276c04"
public static let tag = "6.1.0-alpha" public static let tag = "6.1.0-alpha"
} }

View file

@ -37,7 +37,7 @@ class Log: LoggingServiceDelegate {
private init() { private init() {
service.domain = Bundle.main.bundleIdentifier! 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) Core.enableLogCollection(state: LogCollectionState.Enabled)
setMask() setMask()
LoggingService.Instance.addDelegate(delegate: self) LoggingService.Instance.addDelegate(delegate: self)

View file

@ -87,8 +87,9 @@ class NotificationService: UNNotificationServiceExtension {
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
LoggingService.Instance.logLevel = LogLevel.Debug 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) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled)
Log.info("[msgNotificationService] start msgNotificationService extension") Log.info("[msgNotificationService] start msgNotificationService extension")
/* /*
if (VFSUtil.vfsEnabled(groupName: Config.appGroupName) && !VFSUtil.activateVFS()) { if (VFSUtil.vfsEnabled(groupName: Config.appGroupName) && !VFSUtil.activateVFS()) {