Skip to content

Commit

Permalink
log commands at DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoby committed Jan 6, 2025
1 parent 8b8a351 commit a36f122
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tunnel/src/main/java/org/openziti/tunnel/Tunnel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class Tunnel(app: Application, ): Runnable {
inline fun <reified C: TunnelCommand> processCmd(cmd: C): CompletableFuture<JsonElement?> =
CompletableFuture<TunnelResult>().apply {
val data = cmd.toJson()
Log.i(TAG, "cmd[${cmd.id}] = $data")
Log.d(TAG, "cmd[${cmd.id}] = $data")
executeCommand(cmd.cmd.name, data, this)
}.thenApply {
Log.i(TAG, "result[${cmd.id}] = $it")
Log.d(TAG, "result[${cmd.id}] = $it")
if (!it.success) throw Exception(it.error)
it.data
}
Expand All @@ -84,7 +84,7 @@ class Tunnel(app: Application, ): Runnable {
try {
EventsJson.decodeFromString<Event>(it)
} catch (ex: Exception) {
Log.w("model", ex)
Log.w(TAG, ex)
null
}
}.filterNotNull()
Expand Down

0 comments on commit a36f122

Please sign in to comment.