Philip Dukhov
03/12/2025, 6:11 AMArkadii Ivanov
03/12/2025, 10:05 AMfun AppComponentContext.log(stack: Value<ChildStack<...>>)
3. Call log
in the init
block in a component with stack.
You will have to keep track of the old state and manually compare the new with the old state. It's easy to do for common operations like push
, pop
, bringToFront
, pushToFront
.
Excluding some of the arguments is a bit more complicated. Maybe create an interface like:
interface Loggable {
fun logText(): String
}
Then let configuration classes that need custom logging to implement that interface. And in your log
function check for that interface at runtime and either use logText
or toString
.
Also, be careful to not leak any user-sensitive information like passwords, etc.Alexandru Caraus
03/12/2025, 4:12 PMArkadii Ivanov
03/12/2025, 5:28 PM