Open mcfilib opened 6 years ago
I've added a repo with a minimal Spock app here on the offhand that someone has already done this in the past 😄
https://github.com/filib/spock-katip-example/blob/master/app/Main.hs
I think the quickest way to achieve this is to add a logging interface to either:
st
param which you can get via getState
. Write some combinators to wrap this neatly. I had to get things up and running quickly and simple-logger was just the ticket. Do you think that this would make a good Spock tutorial or would you prefer it be done on e.g. a personal blog post instead?
A writeup on the Spock blog would also work for me.
Hey folks, thanks for writing Spock!
This might not be the place for this request but I was wondering if you could perhaps add some advice to the documentation about how Spock users should go about adding logging to a Spock application. I know there are things like
wai-extras
that have awai
middleware for logging requests but, at least in the applications I work on, I'd also like to do some custom logging.Specifically, I'm interested in how I should go about integrating with common libraries like
monad-logger
orkatip
but I'd appreciate any general advice you have.