indent multi line messages (WIP)

This commit is contained in:
tali 2024-01-19 14:22:16 -05:00
parent 79495e64df
commit e5183a44b8
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ let writer t ~timestamp ~namespace ~level msg =
(level_header level)
Ansi.pr [Bold true; Fg None];
pr_lines t.bp msg ~indent:(0 (*t.align_to - 3*));
let indent =
(* TODO: calculate this differently depending on color settings *)
t.align_to - 3
in
pr_lines t.bp msg ~indent;
Printf.bprintf t.bp "%a\n"
Ansi.pr [Bold false];