Commit eec3269c authored by Toralf Wittner's avatar Toralf Wittner
Browse files

Be cabal 1.10 compatible.

parent 75e93f3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -137,13 +137,13 @@ readNote m s = case reads s of
    [(a, "")] -> a
    _         -> error m

-- | Logs a message with the given level if greater of equal to the
-- | Logs a message with the given level if greater or equal to the
-- logger's threshold.
log :: MonadIO m => Logger -> Level -> (Msg -> Msg) -> m ()
log g l m = unless (level g > l) . liftIO $ putMsg g l m
{-# INLINE log #-}

-- | Abbreviation for 'log' using the corresponding log level.
-- | Abbreviation of 'log' using the corresponding log level.
trace, debug, info, warn, err, fatal :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
trace g = log g Trace
debug g = log g Debug
+7 −7
Original line number Diff line number Diff line
@@ -4,11 +4,11 @@ synopsis: Simplistic logging using fast-logger.
author:               Toralf Wittner
maintainer:           Toralf Wittner <tw@dtex.org>
copyright:            (c) 2014 Toralf Wittner
license:              MPL-2.0
license:              OtherLicense
license-file:         LICENSE
category:             System
build-type:           Simple
cabal-version:        >= 1.20
cabal-version:        >= 1.10

description:
    Trivial logger on top of fast-logger.
@@ -30,9 +30,9 @@ library

    build-depends:
          base         == 4.*
        , bytestring   >= 0.10
        , date-cache   >= 0.3
        , bytestring   >= 0.10.4 && < 0.11
        , date-cache   >= 0.3    && < 0.4
        , fast-logger  >= 2.1.4  && < 2.2
        , text         >= 0.11   && < 1.2
        , transformers >= 0.3
        , unix-time    >= 0.1
        , unix-time    >= 0.1    && < 0.3