-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a Logger to log all the debugging info centralized
- Loading branch information
1 parent
df07eaa
commit 2be50eb
Showing
6 changed files
with
69 additions
and
34 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
libmobiletagging/src/main/java/se/kantarsifo/mobileanalytics/framework/Logger.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package se.kantarsifo.mobileanalytics.framework | ||
|
||
import android.util.Log | ||
|
||
object Logger { | ||
const val TAG = "MobileAppTagging" | ||
fun log(message: String) { | ||
if (TSMobileAnalytics.logPrintsActivated) { | ||
Log.d(TAG, "***********************************") | ||
Log.d(TAG, message) | ||
Log.d(TAG, "***********************************") | ||
} | ||
} | ||
|
||
fun error(message: String) { | ||
if (TSMobileAnalytics.logPrintsActivated) { | ||
Log.e(TAG, "***********************************") | ||
Log.e(TAG, message) | ||
Log.e(TAG, "***********************************") | ||
} | ||
} | ||
|
||
fun fatalError(message: String) { | ||
Log.e(TAG, "***********************************") | ||
Log.e(TAG, message) | ||
Log.e(TAG, "***********************************") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters