I would like to change the color of the output of the log message to the terminal depending on the log level, topic, etc.,
The only logger I found that does this in Haskell is part of the xmonad-contrib package, but I do not want to accept the dependency on it, since it is quite large.
I know that Yesod comes in color, but itโs not obvious to me how to make it work with the magazine outside of the Yesod web application.
I looked at hslogger , which seems to be very similar to System.Log.Logger , but none of them have color support out of the box.
hslogger expands with custom LogHandlers
, maybe someone implemented it with color support?
Are there any alternatives to registering with Haskell, which I still haven't noticed?
EDIT:
Following Don Stuartโs advice, I implemented my own log handler , which works with hslogger and ansi-c to enable terminal logging in color.
source share