Enhance logging for starting
This commit is contained in:
parent
8eb44f2544
commit
9d3c5ab7b1
1 changed files with 8 additions and 3 deletions
|
@ -2,9 +2,12 @@ module Myriad
|
|||
( runMyriadServer
|
||||
) where
|
||||
|
||||
import Control.Monad.Logger (runStdoutLoggingT)
|
||||
|
||||
import Data.String.Conversions
|
||||
import qualified Data.Text as T
|
||||
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Network.Wai.Handler.Warp
|
||||
|
||||
import Myriad.Core
|
||||
import Myriad.Docker
|
||||
|
@ -17,5 +20,7 @@ runMyriadServer configInput = do
|
|||
buildAllImages
|
||||
startCleanup
|
||||
logInfo ["Finished Docker-related setup"]
|
||||
logInfo ["Starting server"]
|
||||
run (fromIntegral . port . config $ env) $ app env
|
||||
let myriadPort = fromIntegral . port $ config env
|
||||
onReady = runStdoutLoggingT $ logInfo ["Server started on port ", cs $ show myriadPort, "!"]
|
||||
settings = setPort myriadPort . setBeforeMainLoop onReady $ defaultSettings
|
||||
runSettings settings $ app env
|
||||
|
|
Loading…
Reference in a new issue