diff options
| author | John MacFarlane <[email protected]> | 2022-10-28 09:32:50 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-10-28 09:32:50 -0700 |
| commit | 135cfed2a385efccf61214002736e81c7b3ef667 (patch) | |
| tree | 8f901701e976572aa5867bed9e2307baaf0236af | |
| parent | 552d3b42aec31ac5e53654f78e0733295a877356 (diff) | |
Print starting server message to stderr instead of stdout.
| -rw-r--r-- | pandoc-cli/server/PandocCLI/Server.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pandoc-cli/server/PandocCLI/Server.hs b/pandoc-cli/server/PandocCLI/Server.hs index d2a1c9d3e..55cc9ffbd 100644 --- a/pandoc-cli/server/PandocCLI/Server.hs +++ b/pandoc-cli/server/PandocCLI/Server.hs @@ -18,6 +18,7 @@ import Network.Wai.Middleware.Timeout (timeout) import Safe (readDef) import System.Environment (lookupEnv) import Text.Pandoc.Server (ServerOpts(..), parseServerOptsFromArgs, app) +import System.IO (stderr, hPutStrLn) -- | Runs the CGI server. runCGI :: IO () @@ -29,5 +30,6 @@ runCGI = do runServer :: [String] -> IO () runServer args = do sopts <- parseServerOptsFromArgs args - putStrLn $ "Starting server on port " <> show (serverPort sopts) <> "..." + hPutStrLn stderr $ + "Starting server on port " <> show (serverPort sopts) <> "..." Warp.run (serverPort sopts) (timeout (serverTimeout sopts) app) |
