aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Logger.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-04-10 13:26:16 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-04-10 13:26:16 -0600
commitfada61902291aeb29914fff288301a8c487c4ecd (patch)
tree047655195f50efcbd51db8f825acf589dc6abead /src/Internal/Logger.hs
parentbf2e2459f800f953d95681a937051fcf56ac79aa (diff)
downloadrde-fada61902291aeb29914fff288301a8c487c4ecd.tar.gz
rde-fada61902291aeb29914fff288301a8c487c4ecd.tar.bz2
rde-fada61902291aeb29914fff288301a8c487c4ecd.zip
Rename Internal to Rahm.Desktop
Diffstat (limited to 'src/Internal/Logger.hs')
-rw-r--r--src/Internal/Logger.hs32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/Internal/Logger.hs b/src/Internal/Logger.hs
deleted file mode 100644
index e5824a4..0000000
--- a/src/Internal/Logger.hs
+++ /dev/null
@@ -1,32 +0,0 @@
-module Internal.Logger where
-
-import XMonad
-import qualified XMonad.Util.ExtensibleState as XS
-import System.IO
-
-import Internal.NoPersist
-
-newtype LoggerState =
- LoggerState {
- logHandle :: Maybe (NoPersist Handle)
- }
-
-instance ExtensionClass LoggerState where
- initialValue = LoggerState Nothing
-
-logs :: String -> X ()
-logs s = do
- LoggerState handle' <- XS.get
-
- handle <-
- case handle' of
- Nothing -> do
- handle <- io $ openFile "/tmp/xmonad.log" AppendMode
- XS.put $ LoggerState $ Just $ NoPersist handle
- return handle
-
- Just (NoPersist h) -> return h
-
- io $ do
- hPutStrLn handle s
- hFlush handle