packages feed

katip-syslog 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+15/−13 lines, 3 filesdep ~katipnew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: katip

API changes (from Hackage documentation)

Files

LICENSE view
@@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2017, IRIS Connect Ltd+Copyright (c) 2017-2019, IRIS Connect Ltd All rights reserved.  Redistribution and use in source and binary forms, with or without
katip-syslog.cabal view
@@ -1,13 +1,13 @@ name:                katip-syslog-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Syslog Katip Scribe description:         A simple Katip Scribe which logs to syslog homepage:            https://github.com/iconnect/katip-syslog#readme license:             BSD3 license-file:        LICENSE author:              Alfredo Di Napoli-maintainer:          alfredo@irisconnect.co.uk-copyright:           2017 IRIS Connect Engineering Team+maintainer:          chrisd@irisconnect.co.uk+copyright:           2017-2019 IRIS Connect Engineering Team category:            Web build-type:          Simple extra-source-files:  README.md@@ -23,7 +23,7 @@   hs-source-dirs:      src   exposed-modules:     Katip.Scribes.Syslog   build-depends:       base  >= 4.7 && < 5-                     , katip < 0.4.0.0+                     , katip < 0.8.0.0                      , hsyslog >= 4 && < 5                      , text < 1.3.0.0                      , string-conv < 0.2
src/Katip/Scribes/Syslog.hs view
@@ -1,12 +1,12 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ScopedTypeVariables #-} module Katip.Scribes.Syslog     ( mkSyslogScribe     ) where  -import           Control.Exception (try, SomeException)+import           Control.Exception (SomeException, try) import           Control.Monad import           Data.Aeson (encode) import           Data.ByteString.Lazy (ByteString)@@ -25,12 +25,14 @@                            , options      = [PID, CONS, ODELAY, NDELAY]                            , priorityMask = NoMask -- Katip does the masking for us.                            }-  let scribe = Scribe $ \ i@Item{..} -> do-                            when (permitItem sev i) $ do-                              res <- try $ withSyslog cfg $ \syslog -> syslog USER (toSyslogPriority _itemSeverity) (toS $ formatItem verb i)-                              case res of-                                Left (e :: SomeException) -> putStrLn (show e)-                                Right () -> return ()+  let scribe = Scribe (\i@Item{..} -> do+                          when (permitItem sev i) $ do+                            res <- try $ withSyslog cfg $ \syslog -> syslog USER (toSyslogPriority _itemSeverity) (toS $ formatItem verb i)+                            case res of+                              Left (e :: SomeException) -> putStrLn (show e)+                              Right () -> return ())+                      (return ())+   return (scribe, return ())  --------------------------------------------------------------------------------