Open nomeata opened 8 years ago
I don't think there is a way to do this. Snap provides: logError :: MonadSnap m => ByteString -> m ()
. What we would need, however, is something like getLogError :: MonadSnap m => m (ByteString -> IO ())
. That way we could get the logger and pass it down. Do you think Snap could provide such a thing @mightybyte?
You definitely can't use Snap.Core.logError
. However you can drop down to System.FastLogger which is provided by snap-server. I personally use an external logging library katip for my apps. YMMV.
I’m using
websockets-snap
to integrate a websockets app into my snap server, and I am stuck finding out how to use snap’s logging facilities from the websockets code, and thewebsockets-snap
documentation does not provide anything here. Is it possible to write to theerror.log
from the websockets handler?