diff options
author | Joris | 2019-09-09 20:42:41 +0200 |
---|---|---|
committer | Joris | 2019-09-09 20:42:41 +0200 |
commit | 88a2f0c22b523dd5246cefaeefd6c08bf9d6fba7 (patch) | |
tree | a138ceec2036313bc81b4ab2b0685914ee166c29 /src/executable/haskell/Conf.hs | |
parent | 3e2c3f014bce0a82ac8708925806be05412898f9 (diff) | |
download | ad-listener-88a2f0c22b523dd5246cefaeefd6c08bf9d6fba7.tar.gz ad-listener-88a2f0c22b523dd5246cefaeefd6c08bf9d6fba7.tar.bz2 ad-listener-88a2f0c22b523dd5246cefaeefd6c08bf9d6fba7.zip |
Use logging library instead of putStrLn
Diffstat (limited to 'src/executable/haskell/Conf.hs')
-rw-r--r-- | src/executable/haskell/Conf.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/executable/haskell/Conf.hs b/src/executable/haskell/Conf.hs index 0dc857b..53a1046 100644 --- a/src/executable/haskell/Conf.hs +++ b/src/executable/haskell/Conf.hs @@ -3,6 +3,7 @@ module Conf , Conf(..) ) where +import qualified Control.Logging as Logging import qualified Data.ConfigManager as Conf import Data.Text (Text) import qualified Data.Text as T @@ -21,6 +22,7 @@ data Conf = Conf , listenTo :: DiffTime , listenInterval :: DiffTime , listenIntervalNoise :: DiffTime + , logLevel :: Logging.LogLevel } deriving Show parse :: FilePath -> IO Conf @@ -38,7 +40,8 @@ parse path = do Conf.lookup "listenFrom" conf <*> Conf.lookup "listenTo" conf <*> Conf.lookup "listenInterval" conf <*> - Conf.lookup "listenIntervalNoise" conf + Conf.lookup "listenIntervalNoise" conf <*> + Conf.lookup "logLevel" conf ) case conf of Left msg -> error (T.unpack msg) |