Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed ordering of importance, of debug and info.

Added a TODO as well
  • Loading branch information...
commit 80bc53b4cf0c9ef9eb35a84c0d788f8bc5f584a2 1 parent dcea2b2
@reenberg authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 XMonad/Log.hs
View
7 XMonad/Log.hs
@@ -29,10 +29,11 @@ logX prio name msg =
-- | Logging with various importance
-infoX, debugX, warningX, errorX, criticalX :: MonadIO m => String -> String -> m ()
+debugX, infoX, warningX, errorX, criticalX :: MonadIO m => String -> String -> m ()
-infoX = logX INFO
+-- This is the ordering of importance, with CRITICAL being the most important.
debugX = logX DEBUG
+infoX = logX INFO
warningX = logX WARNING
errorX = logX ERROR
criticalX = logX CRITICAL
@@ -53,7 +54,7 @@ abortX' name msg =
-- | Setup a logger in $XMonad/xmonad.log and on stderr
setupLogger :: MonadIO m => String -> m ()
setupLogger dir = liftIO $
- do fileH <- fileHandler (dir </> logFile) WARNING
+ do fileH <- fileHandler (dir </> logFile) WARNING -- TODO: This should be defined by the user config, and not harcoded
streamH <- streamHandler stderr WARNING
updateGlobalLogger rootLoggerName $ setHandlers $
map (flip setFormatter $ format) [streamH, fileH]
Please sign in to comment.
Something went wrong with that request. Please try again.