ENH tweak logging
This commit is contained in:
parent
6b3cfd5857
commit
17ebd0137f
|
@ -75,6 +75,11 @@ run :: XIO ()
|
||||||
run = do
|
run = do
|
||||||
-- IDK why this is needed, I thought this was default
|
-- IDK why this is needed, I thought this was default
|
||||||
liftIO $ hSetBuffering stdout LineBuffering
|
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
|
withDBus_ $ \db -> do
|
||||||
c <- evalConfig db
|
c <- evalConfig db
|
||||||
liftIO $ xmobar c
|
liftIO $ xmobar c
|
||||||
|
|
|
@ -130,7 +130,7 @@ import XMonad.Internal.Theme
|
||||||
-- Currently there is no easy way to not use this (oh well)
|
-- Currently there is no easy way to not use this (oh well)
|
||||||
runXIO :: XIO a -> IO a
|
runXIO :: XIO a -> IO a
|
||||||
runXIO x = do
|
runXIO x = do
|
||||||
logOpts <- logOptionsHandle stderr False
|
logOpts <- setLogVerboseFormat True . setLogUseTime True <$> logOptionsHandle stderr False
|
||||||
pc <- mkDefaultProcessContext
|
pc <- mkDefaultProcessContext
|
||||||
withLogFunc logOpts $ \f -> do
|
withLogFunc logOpts $ \f -> do
|
||||||
p <- getParams
|
p <- getParams
|
||||||
|
|
Loading…
Reference in New Issue