Skip to content

Commit e36c94e

Browse files
committed
Log PIDs by default for console output
We've run into a number of issues over time where errant processes hang around and stomp on other tests, and without PIDs in the logging it can be difficult or impossible to conclusively identify and debug these kinds of problems.
1 parent 83b1eae commit e36c94e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/riak_test_escript.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ main(Args) ->
110110
notice
111111
end,
112112

113+
Formatter = {lager_default_formatter, [time," [",severity,"] ", pid, " ", message, "\n"]},
113114
application:set_env(lager, error_logger_hwm, 250), %% helpful for debugging
114-
application:set_env(lager, handlers, [{lager_console_backend, ConsoleLagerLevel},
115+
application:set_env(lager, handlers, [{lager_console_backend, [ConsoleLagerLevel, Formatter]},
115116
{lager_file_backend, [{file, "log/test.log"},
116117
{level, ConsoleLagerLevel}]}]),
117118
lager:start(),

0 commit comments

Comments
 (0)