Skip to content

Commit

Permalink
fix: logging level does not reflect in datadog (#2645)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina authored Jan 31, 2024
1 parent 42c5830 commit 51c465e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 9 additions & 1 deletion app/src/beta/kotlin/com/wire/android/util/DataDogLogger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ object DataDogLogger : LogWriter() {
"clientId" to userClientData.clientId,
)
} ?: emptyMap<String, Any?>()
logger.log(severity.ordinal, message, throwable, attributes)

when (severity) {
Severity.Debug -> logger.d(message, throwable, attributes)
Severity.Info -> logger.i(message, throwable, attributes)
Severity.Warn -> logger.w(message, throwable, attributes)
Severity.Error -> logger.e(message, throwable, attributes)
Severity.Assert,
Severity.Verbose -> logger.v(message, throwable, attributes)
}
}
}
10 changes: 9 additions & 1 deletion app/src/dev/kotlin/com/wire/android/util/DataDogLogger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ object DataDogLogger : LogWriter() {
"clientId" to userClientData.clientId,
)
} ?: emptyMap<String, Any?>()
logger.log(severity.ordinal, message, throwable, attributes)

when (severity) {
Severity.Debug -> logger.d(message, throwable, attributes)
Severity.Info -> logger.i(message, throwable, attributes)
Severity.Warn -> logger.w(message, throwable, attributes)
Severity.Error -> logger.e(message, throwable, attributes)
Severity.Assert,
Severity.Verbose -> logger.v(message, throwable, attributes)
}
}
}
10 changes: 9 additions & 1 deletion app/src/internal/kotlin/com/wire/android/util/DataDogLogger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ object DataDogLogger : LogWriter() {
"clientId" to userClientData.clientId,
)
} ?: emptyMap<String, Any?>()
logger.log(severity.ordinal, message, throwable, attributes)

when (severity) {
Severity.Debug -> logger.d(message, throwable, attributes)
Severity.Info -> logger.i(message, throwable, attributes)
Severity.Warn -> logger.w(message, throwable, attributes)
Severity.Error -> logger.e(message, throwable, attributes)
Severity.Assert,
Severity.Verbose -> logger.v(message, throwable, attributes)
}
}
}
10 changes: 9 additions & 1 deletion app/src/staging/kotlin/com/wire/android/util/DataDogLogger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ object DataDogLogger : LogWriter() {
"clientId" to userClientData.clientId,
)
} ?: emptyMap<String, Any?>()
logger.log(severity.ordinal, message, throwable, attributes)

when (severity) {
Severity.Debug -> logger.d(message, throwable, attributes)
Severity.Info -> logger.i(message, throwable, attributes)
Severity.Warn -> logger.w(message, throwable, attributes)
Severity.Error -> logger.e(message, throwable, attributes)
Severity.Assert,
Severity.Verbose -> logger.v(message, throwable, attributes)
}
}
}

0 comments on commit 51c465e

Please sign in to comment.