packages feed

raven-haskell-scotty 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+25/−18 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

raven-haskell-scotty.cabal view
@@ -1,11 +1,8 @@--- Initial raven-haskell-scotty.cabal generated by cabal init.  For further---  documentation, see http://haskell.org/cabal/users-guide/- name:                raven-haskell-scotty-version:             0.1.0.0-synopsis:            Http interface for Scotty web server.+version:             0.1.0.1+synopsis:            Sentry http interface for Scotty web server. description:         Utilities to log errors in Scotty actions using raven-haskell.-homepage:            http://bitbucket.org/dpwiz/raven-haskell-scotty+homepage:            http://bitbucket.org/dpwiz/raven-haskell license:             MIT license-file:        LICENSE author:              Alexander Bondarenko
src/System/Log/Raven/Scotty.hs view
@@ -1,6 +1,27 @@ {-# LANGUAGE ScopedTypeVariables #-} --- | This package contains utilities to log errors in Scotty actions using raven-haskell.+-- | Utilities to log errors in Scotty actions using raven-haskell.+-- +-- > import Web.Scotty+-- >+-- > import System.Log.Raven+-- > import System.Log.Raven.Transport.HttpConduit (sendRecord)+-- > import System.Log.Raven.Scotty+-- >+-- > main = do+-- >     raven <- initRaven "https://…" id sendRecord stderrFallback+-- >     let hereBeDragons = guardIO raven "my.logger" (Just "DragonsError") (Just "My.Inner.Dragons")+-- >+-- >     scotty 8000 $ do+-- >         post "/some/action/" $ do+-- >             arg1 <- param "arg1"+-- >             arg2 <- param "arg2"+-- >             ds <- hereBeDragons $ dragonsIO arg1 arg2+-- >             if null ds+-- >                 then text "no dragons"+-- >                 else do+-- >                     let msg = "dragons! run!"+-- >                     scottyHttpInterface >>= logError raven "Main.main" msg  module System.Log.Raven.Scotty     ( guardIO@@ -25,16 +46,6 @@  -- | A liftIO alternative that logs unhandled exceptions. --   The function itself is verbose in arguments and designed to be curried and reused.------ > main = do--- >     raven <- initRaven …--- >     let hereBeDragons = guardIO raven "my.logger" (Just "DragonsError") (Just "My.Inner.Dragons")--- >--- >     scotty 8000 $ do--- >         post "/some/action/" $ do--- >             arg1 <- param "arg1"--- >             arg2 <- param "arg2"--- >             hereBeDragons $ dragonsIO arg1 arg2 guardIO :: SentryService -- ^ Configured Sentry service.         -> String        -- ^ Logger name.         -> Maybe String  -- ^ Exception type name.@@ -80,5 +91,4 @@                             | (k, v) <- ps                             ] -    liftIO $ print (url, method, args, qs, hs)     return $ SI.http url method args qs Nothing hs []