aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/MouseMotion.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-04-22 00:27:36 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commit691e08015abb10b059477ba4c35f254e7a1f59be (patch)
treeac6e9defe20a84ea5562e405eea54684e163f665 /src/Rahm/Desktop/MouseMotion.hs
parenta45cfc63c66b2f85768df0eba77e9460a75e6215 (diff)
downloadrde-691e08015abb10b059477ba4c35f254e7a1f59be.tar.gz
rde-691e08015abb10b059477ba4c35f254e7a1f59be.tar.bz2
rde-691e08015abb10b059477ba4c35f254e7a1f59be.zip
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.
Diffstat (limited to 'src/Rahm/Desktop/MouseMotion.hs')
-rw-r--r--src/Rahm/Desktop/MouseMotion.hs4
1 files changed, 2 insertions, 2 deletions
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)