-
Notifications
You must be signed in to change notification settings - Fork 8
/
EmbLogger.kt
44 lines (35 loc) · 1.17 KB
/
EmbLogger.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package io.embrace.android.embracesdk.logging
/**
* A simple interface that is used within the Embrace SDK for logging.
*/
internal interface EmbLogger {
enum class Severity {
DEBUG, INFO, WARNING, ERROR
}
var internalErrorService: InternalErrorService?
/**
* Logs a debug message with an optional throwable.
*/
fun logDebug(msg: String, throwable: Throwable? = null)
/**
* Logs an informational message.
*/
fun logInfo(msg: String, throwable: Throwable? = null)
/**
* Logs a warning message with an optional throwable.
*/
fun logWarning(msg: String, throwable: Throwable? = null)
/**
* Logs a warning message with an optional error.
*/
fun logError(msg: String, throwable: Throwable? = null)
/**
* Logs a warning message that the SDK is not yet initialized for the given action.
*/
fun logSdkNotInitialized(action: String)
/**
* Tracks an internal error. This is sent to our own telemetry so should be used sparingly
* & only for states that we can take actions to improve.
*/
fun trackInternalError(type: InternalErrorType, throwable: Throwable)
}