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 :: String -> IO SentryService
getCrashLogger String
dsn = String
-> (SentryRecord -> SentryRecord)
-> (SentrySettings -> SentryRecord -> IO ())
-> (SentryRecord -> IO ())
-> IO SentryService
Sentry.initRaven String
dsn SentryRecord -> SentryRecord
forall a. a -> a
id SentrySettings -> SentryRecord -> IO ()
Sentry.sendRecord SentryRecord -> IO ()
Sentry.stderrFallback
logCrashMessage :: String -> Sentry.SentryService -> String -> IO ()
logCrashMessage :: String -> SentryService -> String -> IO ()
logCrashMessage String
name SentryService
service String
message = SentryService
-> String
-> SentryLevel
-> String
-> (SentryRecord -> SentryRecord)
-> IO ()
Sentry.register SentryService
service String
name SentryLevel
Sentry.Fatal String
message SentryRecord -> SentryRecord
forall a. a -> a
id