| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Bugsnag.Settings
Synopsis
- newtype BugsnagApiKey = BugsnagApiKey {}
- data BugsnagSettings = BugsnagSettings {}
- newBugsnagSettings :: BugsnagApiKey -> IO BugsnagSettings
- bugsnagSettings :: BugsnagApiKey -> Manager -> BugsnagSettings
- bugsnagShouldNotify :: BugsnagSettings -> BugsnagEvent -> Bool
Documentation
newtype BugsnagApiKey Source #
Constructors
| BugsnagApiKey | |
Fields | |
Instances
| Show BugsnagApiKey Source # | |
Defined in Network.Bugsnag.Settings Methods showsPrec :: Int -> BugsnagApiKey -> ShowS # show :: BugsnagApiKey -> String # showList :: [BugsnagApiKey] -> ShowS # | |
| IsString BugsnagApiKey Source # | |
Defined in Network.Bugsnag.Settings Methods fromString :: String -> BugsnagApiKey # | |
| FromJSON BugsnagApiKey Source # | |
Defined in Network.Bugsnag.Settings Methods parseJSON :: Value -> Parser BugsnagApiKey # parseJSONList :: Value -> Parser [BugsnagApiKey] # | |
data BugsnagSettings Source #
Notifier settings
See .newBugsnagSettings
Constructors
| BugsnagSettings | |
Fields
| |
newBugsnagSettings :: BugsnagApiKey -> IO BugsnagSettings Source #
Construct settings with a new, TLS-enabled Manager
Uses .getGlobalManager
>>>settings <- newBugsnagSettings "API_KEY">>>bsApiKey settingsAPI_KEY
>>>bsReleaseStage settingsProductionReleaseStage
>>>bsNotifyReleaseStages settings[ProductionReleaseStage]
bugsnagSettings :: BugsnagApiKey -> Manager -> BugsnagSettings Source #
Construct settings purely, given an existing Manager
bugsnagShouldNotify :: BugsnagSettings -> BugsnagEvent -> Bool Source #
Should this trigger notification?BugsnagEvent
>>>settings <- newBugsnagSettings "">>>let event = bugsnagEvent $ bugsnagException "" "" []>>>bugsnagShouldNotify settings eventTrue
>>>let devSettings = settings { bsReleaseStage = DevelopmentReleaseStage }>>>bugsnagShouldNotify devSettings eventFalse
>>>bugsnagShouldNotify devSettings { bsNotifyReleaseStages = [DevelopmentReleaseStage] } eventTrue
>>>let ignore = (== "IgnoreMe") . beErrorClass>>>let ignoreSettings = settings { bsIgnoreException = ignore }>>>let ignoreEvent = bugsnagEvent $ bugsnagException "IgnoreMe" "" []>>>bugsnagShouldNotify ignoreSettings eventTrue
>>>bugsnagShouldNotify ignoreSettings ignoreEventFalse