Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do not print snaplet snaplet messages if verbosity explicitly false

This resolves issue #81
  • Loading branch information...
commit 77bf967a8885e06f80591782b7fb2f49d444623e 1 parent 0a9ea00
@MichaelXavier MichaelXavier authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/Snap/Snaplet/Internal/Initializer.hs
View
3  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
------------------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.