diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-04-22 00:27:36 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-04-22 00:27:36 -0600 |
| commit | fd7831aba6f1698883906258a0a1966880427d94 (patch) | |
| tree | ac6e9defe20a84ea5562e405eea54684e163f665 /src/Rahm/Desktop/MouseMotion.hs | |
| parent | 8df47403a0f5ed1a3ef853e25868fa305b2f3a1b (diff) | |
| download | rde-fd7831aba6f1698883906258a0a1966880427d94.tar.gz rde-fd7831aba6f1698883906258a0a1966880427d94.tar.bz2 rde-fd7831aba6f1698883906258a0a1966880427d94.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.hs | 4 |
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) |