From 691e08015abb10b059477ba4c35f254e7a1f59be Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 22 Apr 2022 00:27:36 -0600 Subject: Infrastructure for better logging, finally! Right now all existing logs are logged at Info, but this will change. This should make it significantly easier to debug things wit log levels like Trace. I may at some point define more log level endpoints or come up with a more expressive logging system, but this is a good start. --- src/Rahm/Desktop/MouseMotion.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Rahm/Desktop/MouseMotion.hs') diff --git a/src/Rahm/Desktop/MouseMotion.hs b/src/Rahm/Desktop/MouseMotion.hs index b5e8874..cacb52f 100644 --- a/src/Rahm/Desktop/MouseMotion.hs +++ b/src/Rahm/Desktop/MouseMotion.hs @@ -39,7 +39,7 @@ motion = MouseMotionM $ do ev <- nextMotionOrButton case ev of Right button -> do - logs ("Button " ++ show button) + logs Info "Button %s" (show button) return Nothing Left motion -> return (Just $ uncurry V2 motion) @@ -93,4 +93,4 @@ mouseRotateMotion clockWise counterClockwise = execMouseMotionM doMouse where doMouse = forever $ do v <- motion - liftMouseMotionM $ logs $ "Motion: " ++ show v + liftMouseMotionM $ logs Info "Motion: %s" (show v) -- cgit