Run a
Log effect in terms of the given
LogAction. The
idea behind this function is the following: if you have
LogAction m msg then you can use this action to tell
how to io interpret effect
Log. However, this is only possible
if you also have
Lift m effect because running log
action requires access to monad
m.
This function allows to use extensible effects provided by the
polysemy library with logging provided by
co-log.
You can construct
LogAction independently and then just pass to
this function to tell how to log messages.
Several examples:
- runLogAction mempty: interprets the Log
effect by ignoring all messages.
- runLogAction logStringStdout: interprets
Log effect by allowing to log String to
stdout.