Browse files

Fix format of mnesia overload message

Using ~p in mnesia overload message could lead to wrong messages.
mnesia_tm overload message contains a list of two numbers (queue length)
instead of:
Mnesia is overloaded: {mnesia_tm,message_queue_len,[100,105]}
it prints :
Mnesia is overloaded: {mnesia_tm,message_queue_len,"di"}

Replacing ~p with ~w fixes the problem as it doesn't try
to detect lists of printable charachters
  • Loading branch information...
1 parent 5d74fed commit 814b39351470a8a95947ab432b5610f457318bef @spawnthink committed Oct 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mnesia/src/mnesia_event.erl
2 lib/mnesia/src/mnesia_event.erl
@@ -153,7 +153,7 @@ handle_system_event({mnesia_down, Node}, State) ->
handle_system_event({mnesia_overload, Details}, State) ->
- report_warning("Mnesia is overloaded: ~p~n", [Details]),
+ report_warning("Mnesia is overloaded: ~w~n", [Details]),
{ok, State};
handle_system_event({mnesia_info, Format, Args}, State) ->

0 comments on commit 814b393

Please sign in to comment.