Permalink
Browse files

Do not print snaplet snaplet messages if verbosity explicitly false

This resolves issue #81
  • Loading branch information...
1 parent 0a9ea00 commit 77bf967a8885e06f80591782b7fb2f49d444623e @MichaelXavier MichaelXavier committed May 4, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Snap/Snaplet/Internal/Initializer.hs
@@ -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
------------------------------------------------------------------------------

0 comments on commit 77bf967

Please sign in to comment.