1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 12:51:52 +03:00

Merge pull request #2219 from github/better-terminal-log-config

Check stdout so semanticd logging works well with Procfiles
This commit is contained in:
Timothy Clem 2018-10-22 13:10:59 -07:00 committed by GitHub
commit d04b9d8dbe

View File

@ -25,7 +25,7 @@ import qualified Semantic.Telemetry.Haystack as Haystack
import qualified Semantic.Telemetry.Stat as Stat
import Semantic.Version
import System.Environment
import System.IO (hIsTerminalDevice, stderr)
import System.IO (hIsTerminalDevice, stdout)
import System.Posix.Process
import System.Posix.Types
@ -66,7 +66,7 @@ defaultConfig :: Options -> IO Config
defaultConfig options@Options{..} = do
pid <- getProcessID
hostName <- getHostName
isTerminal <- hIsTerminalDevice stderr
isTerminal <- hIsTerminalDevice stdout
haystackURL <- lookupEnv "HAYSTACK_URL"
(statsHost, statsPort) <- lookupStatsAddr
size <- envLookupNum 1000 "MAX_TELEMETRY_QUEUE_SIZE"