Skip to content

Commit

Permalink
Merge branch 'master' into 4173-extracts-ghcide-tests-and-migrate-it-…
Browse files Browse the repository at this point in the history
…to-use-hls-test-utils
  • Loading branch information
soulomoon authored Apr 16, 2024
2 parents e95d60a + 81f2672 commit 7e3f119
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions hls-plugin-api/src/Ide/Logger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Ide.Logger
, module PrettyPrinterModule
, renderStrict
, toCologActionWithPrio
, defaultLoggingColumns
) where

import Colog.Core (LogAction (..), Severity,
Expand Down
5 changes: 3 additions & 2 deletions hls-test-utils/src/Test/Hls.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import Data.Proxy (Proxy (Proxy))
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL
import Development.IDE (IdeState)
import Development.IDE (IdeState, LoggingColumn (ThreadIdColumn))
import Development.IDE.Main hiding (Log)
import qualified Development.IDE.Main as Ghcide
import qualified Development.IDE.Main as IDEMain
Expand All @@ -94,6 +94,7 @@ import Ide.Logger (Pretty (pretty),
Priority (..), Recorder,
WithPriority (WithPriority, priority),
cfilter, cmapWithPrio,
defaultLoggingColumns,
logWith,
makeDefaultStderrRecorder,
(<+>))
Expand Down Expand Up @@ -348,7 +349,7 @@ pluginTestRecorder = do
-- See 'runSessionWithServer'' for details.
initialiseTestRecorder :: Pretty a => [String] -> IO (Recorder (WithPriority a))
initialiseTestRecorder envVars = do
docWithPriorityRecorder <- makeDefaultStderrRecorder Nothing
docWithPriorityRecorder <- makeDefaultStderrRecorder (Just $ ThreadIdColumn : defaultLoggingColumns)
-- There are potentially multiple environment variables that enable this logger
definedEnvVars <- forM envVars (\var -> fromMaybe "0" <$> lookupEnv var)
let logStdErr = any (/= "0") definedEnvVars
Expand Down

0 comments on commit 7e3f119

Please sign in to comment.