mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-30 11:51:57 +00:00
line buffering for journald
This commit is contained in:
@@ -43,6 +43,7 @@ import Network.Wai.Middleware.Cors (CorsResourcePolicy (..),
|
|||||||
import Network.Wai.Middleware.MethodOverride
|
import Network.Wai.Middleware.MethodOverride
|
||||||
import Network.Wai.Middleware.RequestLogger (Destination (Logger), IPAddrSource (..), OutputFormat (..),
|
import Network.Wai.Middleware.RequestLogger (Destination (Logger), IPAddrSource (..), OutputFormat (..),
|
||||||
destination, mkRequestLogger, outputFormat)
|
destination, mkRequestLogger, outputFormat)
|
||||||
|
import System.IO (hSetBuffering, BufferMode (..))
|
||||||
import System.Log.FastLogger (defaultBufSize, newStdoutLoggerSet, toLogStr)
|
import System.Log.FastLogger (defaultBufSize, newStdoutLoggerSet, toLogStr)
|
||||||
import Yesod.Core
|
import Yesod.Core
|
||||||
import Yesod.Core.Types hiding (Logger)
|
import Yesod.Core.Types hiding (Logger)
|
||||||
@@ -162,6 +163,7 @@ getAppSettings = loadYamlSettings [configSettingsYml] [] useEnv
|
|||||||
-- | The @main@ function for an executable running this site.
|
-- | The @main@ function for an executable running this site.
|
||||||
appMain :: IO ()
|
appMain :: IO ()
|
||||||
appMain = do
|
appMain = do
|
||||||
|
hSetBuffering stdout LineBuffering
|
||||||
-- Get the settings from all relevant sources
|
-- Get the settings from all relevant sources
|
||||||
settings <- loadYamlSettingsArgs
|
settings <- loadYamlSettingsArgs
|
||||||
-- fall back to compile-time values, set to [] to require values at runtime
|
-- fall back to compile-time values, set to [] to require values at runtime
|
||||||
|
|||||||
Reference in New Issue
Block a user