feat/RES-73_Ajout_DebugMode_Analytics #22
@@ -154,7 +154,7 @@ internal class AnalyticsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal func configure(isDebugMode: Bool = false) {
|
internal func configure(isDebugMode: Bool = false) {
|
||||||
isDebugMode = isDebugMode
|
self.isDebugMode = isDebugMode
|
||||||
managers[TrackerType.firebase] = FirebaseAnalyticsManager()
|
managers[TrackerType.firebase] = FirebaseAnalyticsManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,14 +166,16 @@ internal class AnalyticsManager {
|
|||||||
params: [String: Any]?
|
params: [String: Any]?
|
||||||
) {
|
) {
|
||||||
guard isEnabled else {
|
guard isEnabled else {
|
||||||
logger.notice("Analytics disabled")
|
if isDebugMode {
|
||||||
|
logger.log("Analytics disabled")
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
managers.values.forEach { manager in
|
managers.values.forEach { manager in
|
||||||
|
|
||||||
if isDebugMode {
|
if isDebugMode {
|
||||||
logger.info("🖥️ Screen: \(name, privacy: .public) | path: \(path, privacy: .public) | params: \(paramsString, privacy: .public)")
|
logger.debug("🖥️ Screen: \(name, privacy: .public) | path: \(path, privacy: .public) | params: \(String(describing: params ?? [:]), privacy: .public)")
|
||||||
}
|
}
|
||||||
|
|
||||||
manager.logScreen(
|
manager.logScreen(
|
||||||
@@ -191,14 +193,16 @@ internal class AnalyticsManager {
|
|||||||
params: [String: Any]?
|
params: [String: Any]?
|
||||||
) {
|
) {
|
||||||
guard isEnabled else {
|
guard isEnabled else {
|
||||||
logger.notice("Analytics disabled")
|
if isDebugMode {
|
||||||
|
logger.log("Analytics disabled")
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
managers.values.forEach { manager in
|
managers.values.forEach { manager in
|
||||||
|
|
||||||
if isDebugMode {
|
if isDebugMode {
|
||||||
logger.info("📊 Event: \(name, privacy: .public) | action: \(action ?? "-", privacy: .public) | category: \(category ?? "-", privacy: .public) | params: \(paramsString, privacy: .public)")
|
logger.debug("📊 Event: \(name, privacy: .public) | action: \(action, privacy: .public) | category: \(category, privacy: .public) | params: \(String(describing: params ?? [:]), privacy: .public)")
|
||||||
}
|
}
|
||||||
|
|
||||||
manager.logEvent(
|
manager.logEvent(
|
||||||
@@ -223,7 +227,7 @@ internal class AnalyticsManager {
|
|||||||
internal func logEventS1DefTwo(
|
internal func logEventS1DefTwo(
|
||||||
title: String,
|
title: String,
|
||||||
count: String,
|
count: String,
|
||||||
test2: String = "tes"
|
test2: String = "test"
|
||||||
) {
|
) {
|
||||||
logEvent(
|
logEvent(
|
||||||
name: "s1 def two",
|
name: "s1 def two",
|
||||||
|
@@ -179,7 +179,6 @@ enum StringsFileGenerator {
|
|||||||
section
|
section
|
||||||
.definitions
|
.definitions
|
||||||
.forEach { definition in // swiftlint:disable:this closure_body_length
|
.forEach { definition in // swiftlint:disable:this closure_body_length
|
||||||
var skipDefinition = false
|
|
||||||
var isNoTranslation = false
|
var isNoTranslation = false
|
||||||
|
|
||||||
var localizationTab: [XCStringLocalization] = []
|
var localizationTab: [XCStringLocalization] = []
|
||||||
|
Reference in New Issue
Block a user