| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Bugsnag.Settings
- newtype BugsnagApiKey = BugsnagApiKey {}
- data BugsnagSettings = BugsnagSettings {
- bsApiKey :: BugsnagApiKey
- bsAppVersion :: Maybe Text
- bsReleaseStage :: BugsnagReleaseStage
- bsNotifyReleaseStages :: [BugsnagReleaseStage]
- bsBeforeNotify :: BeforeNotify
- bsIgnoreException :: BugsnagException -> Bool
- bsGroupingHash :: BugsnagEvent -> Maybe Text
- bsIsInProject :: FilePath -> Bool
- bsFilterStackFrames :: BugsnagStackFrame -> Bool
- bsHttpManager :: Manager
- newBugsnagSettings :: BugsnagApiKey -> IO BugsnagSettings
- bugsnagSettings :: BugsnagApiKey -> Manager -> BugsnagSettings
- bugsnagShouldNotify :: BugsnagSettings -> BugsnagException -> Bool
Documentation
data BugsnagSettings Source #
Notifier settings
See .newBugsnagSettings
Constructors
| BugsnagSettings | |
Fields
| |
newBugsnagSettings :: BugsnagApiKey -> IO BugsnagSettings Source #
Construct settings with a new, TLS-enabled Manager
>>>:set -XOverloadedStrings>>>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 -> BugsnagException -> Bool Source #
Should this trigger notification?BugsnagException
>>>:set -XOverloadedStrings>>>settings <- newBugsnagSettings "">>>let exception = bugsnagException "" "" []>>>bugsnagShouldNotify settings exceptionTrue
>>>let devSettings = settings { bsReleaseStage = DevelopmentReleaseStage }>>>bugsnagShouldNotify devSettings exceptionFalse
>>>bugsnagShouldNotify devSettings { bsNotifyReleaseStages = [DevelopmentReleaseStage] } exceptionTrue
>>>let ignore = (== "IgnoreMe") . beErrorClass>>>let ignoreSettings = settings { bsIgnoreException = ignore }>>>bugsnagShouldNotify ignoreSettings exceptionTrue
>>>bugsnagShouldNotify ignoreSettings exception { beErrorClass = "IgnoreMe" }False