fix: debug logging: fix non-logging ptrace*IO, dbg*IO
This commit is contained in:
parent
05aeedf6c9
commit
6d2687e67d
@ -101,6 +101,7 @@ module Hledger.Utils.Debug (
|
|||||||
,traceOrLog
|
,traceOrLog
|
||||||
,traceOrLogAt
|
,traceOrLogAt
|
||||||
,ptraceOrLogAt
|
,ptraceOrLogAt
|
||||||
|
,ptraceOrLogAtIO
|
||||||
,traceOrLogAtWith
|
,traceOrLogAtWith
|
||||||
|
|
||||||
-- * Pretty tracing/logging in pure code
|
-- * Pretty tracing/logging in pure code
|
||||||
@ -304,7 +305,7 @@ ptraceLogAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m ()
|
|||||||
ptraceLogAtIO level label a =
|
ptraceLogAtIO level label a =
|
||||||
if level > 0 && debugLevel < level
|
if level > 0 && debugLevel < level
|
||||||
then return ()
|
then return ()
|
||||||
else return $ traceLog (labelledPretty False label a) ()
|
else traceLogIO (labelledPretty False label a)
|
||||||
|
|
||||||
-- Trace or log a string depending on shouldLog,
|
-- Trace or log a string depending on shouldLog,
|
||||||
-- before returning the second argument.
|
-- before returning the second argument.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user