diff --git a/src/lager_format.erl b/src/lager_format.erl index 2a9f995..6407474 100644 --- a/src/lager_format.erl +++ b/src/lager_format.erl @@ -205,7 +205,7 @@ control(C, A, F, Adj, P, Pad, Enc, L) -> {{C, A, F, Adj, P, Pad, Enc}, L}. control2($w, [A], F, Adj, P, Pad, _Enc, L) -> - Term = lager_trunc_io:fprint(A, L), + Term = lager_trunc_io:fprint(A, L, [{lists_as_strings, false}]), Res = term(Term, F, Adj, P, Pad), {Res, L - lists:flatlength(Res)}; control2($p, [A], F, Adj, P, Pad, _Enc, L) -> @@ -213,7 +213,7 @@ control2($p, [A], F, Adj, P, Pad, _Enc, L) -> Res = term(Term, F, Adj, P, Pad), {Res, L - lists:flatlength(Res)}; control2($W, [A,Depth], F, Adj, P, Pad, _Enc, L) when is_integer(Depth) -> - Term = lager_trunc_io:fprint(A, L, [{depth, Depth}]), + Term = lager_trunc_io:fprint(A, L, [{depth, Depth}, {lists_as_strings, false}]), Res = term(Term, F, Adj, P, Pad), {Res, L - lists:flatlength(Res)}; control2($P, [A,Depth], F, Adj, P, Pad, _Enc, L) when is_integer(Depth) -> diff --git a/src/lager_trunc_io.erl b/src/lager_trunc_io.erl index 11ab335..3e1c4a0 100644 --- a/src/lager_trunc_io.erl +++ b/src/lager_trunc_io.erl @@ -45,7 +45,7 @@ %% negative depth means no depth limiting depth = -1 :: integer(), %% whether to print lists as strings, if possible - lists_as_strings = false :: boolean(), + lists_as_strings = true :: boolean(), %% force strings, or binaries to be printed as a string, %% even if they're not printable force_strings = false :: boolean()