From 9fc92cefe499d93c9f4ffc3e65faf7e4c6d9efcd Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 10 Sep 2022 12:54:19 -1000 Subject: [PATCH] imp: ui: at --debug 2+, also log events --- hledger-ui/Hledger/UI/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hledger-ui/Hledger/UI/Main.hs b/hledger-ui/Hledger/UI/Main.hs index deaa7d7ca..ec0606355 100644 --- a/hledger-ui/Hledger/UI/Main.hs +++ b/hledger-ui/Hledger/UI/Main.hs @@ -33,7 +33,7 @@ import Hledger.UI.Theme import Hledger.UI.UIOptions import Hledger.UI.UITypes import Hledger.UI.UIState (uiState, getDepth) -import Hledger.UI.UIUtils (dlogUiTrace) +import Hledger.UI.UIUtils (dlogUiTrace, dlogUiTraceM) import Hledger.UI.MenuScreen import Hledger.UI.AccountsScreen import Hledger.UI.BalancesheetScreen @@ -68,7 +68,7 @@ main = do runBrickUi :: UIOpts -> Journal -> IO () runBrickUi uopts0@UIOpts{uoCliOpts=copts@CliOpts{inputopts_=_iopts,reportspec_=rspec@ReportSpec{_rsReportOpts=ropts}}} j = - dlogUiTrace "========= runBrickUi" $ do + dlogUiTrace "==== runBrickUi" $ do let today = copts^.rsDay @@ -240,6 +240,7 @@ brickApp mtheme = App { uiHandle :: BrickEvent Name AppEvent -> EventM Name UIState () uiHandle ev = do + dlogUiTraceM $ "==== " ++ show ev ui <- get case aScreen ui of MS _ -> msHandle ev