feat/RES-73_Ajout_DebugMode_Analytics #22

Merged
q.bandera merged 5 commits from feat/RES-73_Ajout_DebugMode_Analytics into master 2025-10-21 15:03:05 +02:00
Showing only changes of commit b9e610a6d9 - Show all commits

View File

@@ -121,7 +121,7 @@ internal class AnalyticsManager {
var managers: [TrackerType: AnalyticsManagerProtocol] = [:]
private var isDebugMode: Bool = false
private var isDebugMode: Bool = false
private var isEnabled: Bool {
if ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" {
@@ -202,7 +202,7 @@ internal class AnalyticsManager {
managers.values.forEach { manager in
if isDebugMode {
logger.debug("📊 Event: \(name, privacy: .public) | action: \(action, privacy: .public) | category: \(category, privacy: .public) | params: \(String(describing: params ?? [:]), privacy: .public)")
logger.debug("📊 Event: \(name, privacy: .public) | action: \(action.isEmpty ? "-" : action, privacy: .public) | category: \(category.isEmpty ? "-" : category, privacy: .public) | params: \(String(describing: params ?? [:]), privacy: .public)")
}
manager.logEvent(