From e37ccee3d7205dbddf77c16f1d6cff8ca108cd17 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 30 Jun 2015 18:30:24 -0400 Subject: [PATCH] Use a let binding for greater clarity --- yesod-core/Yesod/Core/Class/Yesod.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yesod-core/Yesod/Core/Class/Yesod.hs b/yesod-core/Yesod/Core/Class/Yesod.hs index 70b7266f..14224af8 100644 --- a/yesod-core/Yesod/Core/Class/Yesod.hs +++ b/yesod-core/Yesod/Core/Class/Yesod.hs @@ -633,10 +633,6 @@ formatLogMessage :: IO ZonedDate -> IO LogStr formatLogMessage getdate loc src level msg = do now <- getdate - let sourceSuffix = if loc_package loc == "" then "" else mempty - `mappend` " @(" - `mappend` toLogStr (fileLocationToString loc) - `mappend` ")" return $ mempty `mappend` toLogStr now `mappend` " [" @@ -650,6 +646,11 @@ formatLogMessage getdate loc src level msg = do `mappend` msg `mappend` sourceSuffix `mappend` "\n" + where + sourceSuffix = if loc_package loc == "" then "" else mempty + `mappend` " @(" + `mappend` toLogStr (fileLocationToString loc) + `mappend` ")" -- | Customize the cookies used by the session backend. You may -- use this function on your definition of 'makeSessionBackend'.