Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed ordering of importance, of debug and info.

Added a TODO as well
  • Loading branch information...
commit 80bc53b4cf0c9ef9eb35a84c0d788f8bc5f584a2 1 parent dcea2b2
Jesper Reenberg authored

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. +4 3 XMonad/Log.hs
7 XMonad/Log.hs
@@ -29,10 +29,11 @@ logX prio name msg =
29 29
30 30
31 31 -- | Logging with various importance
32   -infoX, debugX, warningX, errorX, criticalX :: MonadIO m => String -> String -> m ()
  32 +debugX, infoX, warningX, errorX, criticalX :: MonadIO m => String -> String -> m ()
33 33
34   -infoX = logX INFO
  34 +-- This is the ordering of importance, with CRITICAL being the most important.
35 35 debugX = logX DEBUG
  36 +infoX = logX INFO
36 37 warningX = logX WARNING
37 38 errorX = logX ERROR
38 39 criticalX = logX CRITICAL
@@ -53,7 +54,7 @@ abortX' name msg =
53 54 -- | Setup a logger in $XMonad/xmonad.log and on stderr
54 55 setupLogger :: MonadIO m => String -> m ()
55 56 setupLogger dir = liftIO $
56   - do fileH <- fileHandler (dir </> logFile) WARNING
  57 + do fileH <- fileHandler (dir </> logFile) WARNING -- TODO: This should be defined by the user config, and not harcoded
57 58 streamH <- streamHandler stderr WARNING
58 59 updateGlobalLogger rootLoggerName $ setHandlers $
59 60 map (flip setFormatter $ format) [streamH, fileH]

0 comments on commit 80bc53b

Please sign in to comment.
Something went wrong with that request. Please try again.