-
Notifications
You must be signed in to change notification settings - Fork 8
logging
Florian Schuster edited this page Apr 20, 2020
·
4 revisions
a configuration to define how a Controller
logs its actions, mutations, state and errors. the configuration can be set for each Controller
via the builder or via var ControllerLog.default
to change it for all Controller
's. the following are available:
-
None
: logs nothing. -
Println
: Usesprintln
to log. -
Custom
: allows to attach a custom logger.
The Custom
logger allows to filter specific ControllerEvent
s:
val controller = scope.createController<Action, Mutation, State>(
controllerLog = ControllerLog.Custom { message ->
if (event is ControllerEvent.State) {
println(message)
}
}
...,
)