Skip to content

Commit

Permalink
Do not print snaplet snaplet messages if verbosity explicitly false
Browse files Browse the repository at this point in the history
This resolves issue #81
  • Loading branch information
MichaelXavier committed May 4, 2013
1 parent 0a9ea00 commit 77bf967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Snap/Snaplet/Internal/Initializer.hs
Expand Up @@ -593,10 +593,11 @@ serveSnaplet startConfig initializer = do
createDirectoryIfMissing False "log"
let serve = simpleHttpServe conf

liftIO $ hPutStrLn stderr $ T.unpack msgs
when (loggingEnabled conf) $ liftIO $ hPutStrLn stderr $ T.unpack msgs
_ <- try $ serve $ site
:: IO (Either SomeException ())
doCleanup
where loggingEnabled = not . (== Just False) . getVerbose


------------------------------------------------------------------------------
Expand Down

0 comments on commit 77bf967

Please sign in to comment.