Skip to content

Commit

Permalink
Changed stdout buffering to line-by-line
Browse files Browse the repository at this point in the history
This is helpful for those who want to parse kmonad's logging output.
This was apparently not automatic in certain circumstances where kmonad
was not being run in a login shell.
  • Loading branch information
david-janssen committed Feb 2, 2024
1 parent eea2585 commit a9849e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/KMonad/App/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ main = getCmd >>= runCmd
-- 3. Maybe start KMonad
runCmd :: Cmd -> IO ()
runCmd c = do
hSetBuffering stdout LineBuffering
o <- logOptionsHandle stdout False <&> setLogMinLevel (c^.logLvl)
withLogFunc o $ \f -> runRIO f $ do
cfg <- loadConfig c
Expand Down

0 comments on commit a9849e9

Please sign in to comment.