What is the correct way of logging when using arro...
# arrow
j
What is the correct way of logging when using arrow? Would one do: IO { logger.info("Hallo world") } ?
p
yea, pretty much
Copy code
provisionCustomer()
  .flatTap {
    IO { <http://logger.info|logger.info>("Hallo world") }
  }
flatTap is flatMap but it discards the result of the inner IO
so it’s just a peek inside to do an effect 😄
p
would make sense to have suspend log(msg:String):Unit instead of using IO?
p
yeah, that simplifies it