Improve logging by dropping trailing newline

This commit is contained in:
Julian Ospald 2023-11-18 13:09:19 +08:00
parent 335099ad19
commit d277e56121
No known key found for this signature in database
GPG Key ID: 4275CDA6A29BED43
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ logInternal logLevel msg = do
Info -> style' "[ Info ]"
Warn -> style' "[ Warn ]"
Error -> style' "[ Error ]"
let strs = T.split (== '\n') msg
let strs = T.split (== '\n') . T.dropWhileEnd (`elem` ("\n\r" :: String)) $ msg
let out = case strs of
[] -> T.empty
(x:xs) ->