Merge remote-tracking branch 'origin/master' into persistent2-simpler-dispatch
This commit is contained in:
commit
5e6b19f624
@ -14,6 +14,7 @@ import Yesod.Default.Config
|
|||||||
import Network.Wai (Application)
|
import Network.Wai (Application)
|
||||||
import Network.Wai.Handler.Warp
|
import Network.Wai.Handler.Warp
|
||||||
(runSettings, defaultSettings, settingsPort, settingsHost, settingsOnException)
|
(runSettings, defaultSettings, settingsPort, settingsHost, settingsOnException)
|
||||||
|
import qualified Network.Wai.Handler.Warp as Warp
|
||||||
import System.Directory (doesDirectoryExist, removeDirectoryRecursive)
|
import System.Directory (doesDirectoryExist, removeDirectoryRecursive)
|
||||||
import Network.Wai.Middleware.Gzip (gzip, GzipFiles (GzipCacheFolder), gzipFiles, def)
|
import Network.Wai.Middleware.Gzip (gzip, GzipFiles (GzipCacheFolder), gzipFiles, def)
|
||||||
import Network.Wai.Middleware.Autohead (autohead)
|
import Network.Wai.Middleware.Autohead (autohead)
|
||||||
@ -68,12 +69,19 @@ defaultMainLog load getApp = do
|
|||||||
runSettings defaultSettings
|
runSettings defaultSettings
|
||||||
{ settingsPort = appPort config
|
{ settingsPort = appPort config
|
||||||
, settingsHost = appHost config
|
, settingsHost = appHost config
|
||||||
, settingsOnException = const $ \e -> logFunc
|
, settingsOnException = const $ \e -> when (shouldLog' e) $ logFunc
|
||||||
$(qLocation >>= liftLoc)
|
$(qLocation >>= liftLoc)
|
||||||
"yesod"
|
"yesod"
|
||||||
LevelError
|
LevelError
|
||||||
(toLogStr $ "Exception from Warp: " ++ show e)
|
(toLogStr $ "Exception from Warp: " ++ show e)
|
||||||
} app
|
} app
|
||||||
|
where
|
||||||
|
shouldLog' =
|
||||||
|
#if MIN_VERSION_wai(2,1,3)
|
||||||
|
Warp.defaultShouldDisplayException
|
||||||
|
#else
|
||||||
|
const True
|
||||||
|
#endif
|
||||||
|
|
||||||
-- | Run your application continously, listening for SIGINT and exiting
|
-- | Run your application continously, listening for SIGINT and exiting
|
||||||
-- when received
|
-- when received
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod
|
name: yesod
|
||||||
version: 1.2.5
|
version: 1.2.5.1
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
@ -23,7 +23,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4.3 && < 5
|
build-depends: base >= 4.3 && < 5
|
||||||
, yesod-core >= 1.2.2 && < 1.3
|
, yesod-core >= 1.2.2 && < 1.3
|
||||||
, yesod-auth >= 1.2 && < 1.3
|
, yesod-auth >= 1.2 && < 1.4
|
||||||
, yesod-persistent >= 1.2 && < 1.3
|
, yesod-persistent >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 0.4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user