Closed mpilgrem closed 4 years ago
Since my original pull request, I have changed the type in the three setLog...
functions from Text
to Utf8Builder
. Originally, I reasoned that Text
was a more user-friendly type for those functions but now I think that it is wrong to impose the Text -> Utf8Builder
overhead on all users.
The motivation for this pull request is that the exisitng hard-coded colours in
RIO.Process.withProcessTimeLog
andRIO.Prelude.Logger.simpleLogFunc
(for timestamps and locs) are not visible when using the Solarised Dark theme.Tested on Windows 10 by sucessfully rebuilding
stack
(which depends onrio
), with and without making use of the option to customise logger colours.The defaults are the same as what was previously hard-coded and
RIO.Prelude.Logger
does not export the constructor ofLogOption
, so existing code depending onrio
should not be affected.A new
LogColors
type is exported, and an associated accessor (logFuncColorsL
):timestamps and locs in
simpleLogFunc
use the colour of secondary content.withProcessTimeLog
uses accent colour 0 to highlight the duration time.