Use shouldLog in scaffold

This commit is contained in:
Michael Snoyman 2012-09-24 15:51:44 +02:00
parent a30cc74087
commit 48357a6fd3
2 changed files with 7 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal) import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Conduit (Manager) import Network.HTTP.Conduit (Manager)
import qualified Settings import qualified Settings
import Settings.Development (development)
import qualified Database.Persist.Store import qualified Database.Persist.Store
import Settings.StaticFiles import Settings.StaticFiles
import Database.Persist.~importGenericDB~ import Database.Persist.~importGenericDB~
@ -115,6 +116,11 @@ instance Yesod ~sitearg~ where
-- Place Javascript at bottom of the body tag so the rest of the page loads first -- Place Javascript at bottom of the body tag so the rest of the page loads first
jsLoader _ = BottomOfBody jsLoader _ = BottomOfBody
-- What messages should be logged. The following includes all messages when
-- in development, and warnings and errors in production.
shouldLog _ _source level =
development || level == LevelWarn || level == LevelError
-- How to run database actions. -- How to run database actions.
instance YesodPersist ~sitearg~ where instance YesodPersist ~sitearg~ where
type YesodPersistBackend ~sitearg~ = ~dbMonad~ type YesodPersistBackend ~sitearg~ = ~dbMonad~

View File

@ -52,7 +52,7 @@ library
build-depends: base >= 4 && < 5 build-depends: base >= 4 && < 5
-- , yesod-platform >= 1.1 && < 1.2 -- , yesod-platform >= 1.1 && < 1.2
, yesod >= 1.1 && < 1.2 , yesod >= 1.1 && < 1.2
, yesod-core >= 1.1 && < 1.2 , yesod-core >= 1.1.2 && < 1.2
, yesod-auth >= 1.1 && < 1.2 , yesod-auth >= 1.1 && < 1.2
, yesod-static >= 1.1 && < 1.2 , yesod-static >= 1.1 && < 1.2
, yesod-default >= 1.1 && < 1.2 , yesod-default >= 1.1 && < 1.2