From 6d2687e67d9808d18f2204faf6c874e9b7287ea2 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 7 Nov 2022 14:50:13 -1000 Subject: [PATCH] fix: debug logging: fix non-logging ptrace*IO, dbg*IO --- hledger-lib/Hledger/Utils/Debug.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Utils/Debug.hs b/hledger-lib/Hledger/Utils/Debug.hs index 8fc23c6f4..396be6358 100644 --- a/hledger-lib/Hledger/Utils/Debug.hs +++ b/hledger-lib/Hledger/Utils/Debug.hs @@ -101,6 +101,7 @@ module Hledger.Utils.Debug ( ,traceOrLog ,traceOrLogAt ,ptraceOrLogAt + ,ptraceOrLogAtIO ,traceOrLogAtWith -- * Pretty tracing/logging in pure code @@ -304,7 +305,7 @@ ptraceLogAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m () ptraceLogAtIO level label a = if level > 0 && debugLevel < level then return () - else return $ traceLog (labelledPretty False label a) () + else traceLogIO (labelledPretty False label a) -- Trace or log a string depending on shouldLog, -- before returning the second argument.