Skip to content

Commit

Permalink
feat(logging): Determine the log level based on elaraDebug variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bristermitten committed Jun 1, 2024
1 parent f95de02 commit 93f8f8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Elara/Pipeline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Polysemy (Effect, Embed, Members, Sem, runM, subsume_)
import Polysemy.Log (Log, Severity (..), interpretLogStdoutLevel)
import Polysemy.Maybe (MaybeE, runMaybe)
import Polysemy.Time.Interpreter.Ghc
import Print (elaraDebug)

-- | All stages of a pipeline must be interpreted into this effect stack.
type PipelineResultEff = '[MaybeE, DiagnosticWriter (Doc AnsiStyle), Log, Embed IO]
Expand All @@ -34,5 +35,5 @@ finalisePipeline =
. runDiagnosticWriter
. runMaybe
. interpretTimeGhc
. interpretLogStdoutLevel (Just Info)
. interpretLogStdoutLevel (Just $ if elaraDebug then Debug else Info)
. subsume_

0 comments on commit 93f8f8a

Please sign in to comment.