module SentryLogging(
getCrashLogger, logCrashMessage
) where
import qualified System.Log.Raven as Sentry
import qualified System.Log.Raven.Transport.HttpConduit as Sentry
import qualified System.Log.Raven.Types as Sentry
getCrashLogger :: String -> IO Sentry.SentryService
getCrashLogger dsn = Sentry.initRaven dsn id Sentry.sendRecord Sentry.stderrFallback
logCrashMessage :: String -> Sentry.SentryService -> String -> IO ()
logCrashMessage name service message = Sentry.register service name Sentry.Fatal message id