From e3c414fe596e647c5667b3e70259b3af7cb943f5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 12 Jul 2024 13:27:55 +0100 Subject: [PATCH] ;dev: cli: clarify that conf debug output goes to console --- hledger/Hledger/Cli.hs | 3 +++ hledger/Hledger/Cli/Conf.hs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hledger/Hledger/Cli.hs b/hledger/Hledger/Cli.hs index ed3d65cd2..cd442b5ff 100644 --- a/hledger/Hledger/Cli.hs +++ b/hledger/Hledger/Cli.hs @@ -188,10 +188,13 @@ main = withGhcDebug' $ do -- let's go! let + -- Trace helpers. These always trace to stderr, even when running `hledger ui`; + -- that's ok as conf is a hledger cli feature for now. dbgIO, dbgIO1, dbgIO2 :: Show a => String -> a -> IO () -- this signature is needed dbgIO = ptraceAtIO verboseDebugLevel dbgIO1 = ptraceAtIO 1 dbgIO2 = ptraceAtIO 2 + dbgIO "running" prognameandversion starttime <- getPOSIXTime diff --git a/hledger/Hledger/Cli/Conf.hs b/hledger/Hledger/Cli/Conf.hs index 7114cd613..a94bcf3a0 100644 --- a/hledger/Hledger/Cli/Conf.hs +++ b/hledger/Hledger/Cli/Conf.hs @@ -75,6 +75,8 @@ confLookup cmd Conf{confSections} = -- Otherwise this returns the parsed Conf, and the file path. getConf :: RawOpts -> IO (Conf, Maybe FilePath) getConf rawopts + -- As in Cli.hs, conf debug output always goes to stderr; + -- that's ok as conf is a hledger cli feature for now. | noconf = return $ traceAt 1 "ignoring config files" (nullconf, Nothing) | otherwise = do defconfpaths <- confFilePaths