ENH tweak logging

This commit is contained in:
Nathan Dwarshuis 2023-01-01 18:06:48 -05:00
parent 6b3cfd5857
commit 17ebd0137f
2 changed files with 6 additions and 1 deletions

View File

@ -75,6 +75,11 @@ run :: XIO ()
run = do
-- IDK why this is needed, I thought this was default
liftIO $ hSetBuffering stdout LineBuffering
-- this isn't totally necessary except for the fact that killing xmobar
-- will make it print something about catching SIGTERM, and without
-- linebuffering it usually only prints the first few characters (even then
-- it only prints 10-20% of the time)
liftIO $ hSetBuffering stderr LineBuffering
withDBus_ $ \db -> do
c <- evalConfig db
liftIO $ xmobar c

View File

@ -130,7 +130,7 @@ import XMonad.Internal.Theme
-- Currently there is no easy way to not use this (oh well)
runXIO :: XIO a -> IO a
runXIO x = do
logOpts <- logOptionsHandle stderr False
logOpts <- setLogVerboseFormat True . setLogUseTime True <$> logOptionsHandle stderr False
pc <- mkDefaultProcessContext
withLogFunc logOpts $ \f -> do
p <- getParams