Adding compiled libs and customizing the log message.

This commit is contained in:
Vitor Pamplona
2026-04-01 13:50:36 -04:00
parent bc24434f1c
commit 45f1d79410
3 changed files with 16 additions and 11 deletions
@@ -51,9 +51,15 @@ class TorService(
val status: StateFlow<TorServiceStatus> = _status.asStateFlow() val status: StateFlow<TorServiceStatus> = _status.asStateFlow()
init { init {
ArtiNative.setLogCallback( ArtiNative.setLogCallback { text ->
ArtiLogCallback { text -> Log.d("TorService") {
Log.d("TorService") { "Arti: $text" } val newLine = text.indexOf('\n')
if (newLine > 1) {
"Arti: ${text.substring(0, newLine)}"
} else {
"Arti: $text"
}
}
when { when {
text.contains("Sufficiently bootstrapped", ignoreCase = true) -> { text.contains("Sufficiently bootstrapped", ignoreCase = true) -> {
@@ -61,8 +67,7 @@ class TorService(
Log.d("TorService") { "Arti SOCKS proxy active on port $socksPort" } Log.d("TorService") { "Arti SOCKS proxy active on port $socksPort" }
} }
} }
}, }
)
} }
/** /**
Binary file not shown.
Binary file not shown.