You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the websockets-snap documentation does not provide anything here. Is it possible to write to the error.log from the websockets handler?
The text was updated successfully, but these errors were encountered:
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?The text was updated successfully, but these errors were encountered: