packages feed

filter-logger 0.2.0.0 → 0.3.0.0

raw patch · 3 files changed

+10/−5 lines, 3 filesdep +semigroupsdep ~base

Dependencies added: semigroups

Dependency ranges changed: base

Files

README.md view
@@ -1,4 +1,6 @@ # filter-logger+[Hackage](https://hackage.haskell.org/package/filter-logger#readme)+[![Build Status](https://travis-ci.org/caneroj1/filter-logger.svg?branch=master)](https://travis-ci.org/caneroj1/filter-logger)  Filterable request logging as a wai middleware. Change what data is logged and when. 
filter-logger.cabal view
@@ -1,6 +1,6 @@ name:                filter-logger-version:             0.2.0.0-synopsis:            Filterable request logging as a wai middleware. Change what data is logged and when.+version:             0.3.0.0+synopsis:            Filterable request logging wai middleware. Change how data is logged and when. description:         Composable filters to transform objects and control when they are written to server logs. homepage:            https://github.com/caneroj1/filter-logger#readme license:             MIT@@ -17,13 +17,14 @@   hs-source-dirs:      src   exposed-modules:     Network.Wai.Middleware.FilterLogger                      , Network.Wai.Middleware.FilterLogger.Internal-  build-depends:       base >= 4.7 && < 5+  build-depends:       base >= 4.6 && < 5                      , aeson                      , aeson-pretty                      , bytestring                      , data-default                      , fast-logger                      , http-types+                     , semigroups                      , wai                      , wai-extra   default-language:    Haskell2010
src/Network/Wai/Middleware/FilterLogger/Internal.hs view
@@ -36,7 +36,8 @@ -- | Typeclass for types that can be converted into a strict 'ByteString' -- and be shown in a log. class LogShowable a where-  logShow :: a -> ByteString -- | Convert the type into a strict 'ByteString' to be displayed in the logs.+  -- | Convert the type into a strict 'ByteString' to be displayed in the logs.+  logShow :: a -> ByteString  instance LogShowable ByteString where   logShow = id@@ -57,7 +58,8 @@ -- | Typeclass for types that can be converted into from a strict 'ByteString' and will be used as -- arguments to 'LogFilter' class LogFilterable a where-  prep :: ByteString -> Maybe a -- | Try to convert the type from a strict 'ByteString'.+  -- | Try to convert the type from a strict 'ByteString'.+  prep :: ByteString -> Maybe a  instance LogFilterable ByteString where   prep = return