25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Log Mnesia table type on creation

This commit is contained in:
Evgeny Khramtsov 2019-09-10 21:57:51 +03:00
parent 533a4eec96
commit 56b4d3902a

View File

@ -258,7 +258,13 @@ validator() ->
[unique]).
create(Name, TabDef) ->
?INFO_MSG("Creating Mnesia table '~s'", [Name]),
Type = lists:foldl(
fun({ram_copies, _}, _) -> " ram ";
({disc_copies, _}, _) -> " disc ";
({disc_only_copies, _}, _) -> " disc_only ";
(_, Acc) -> Acc
end, " ", TabDef),
?INFO_MSG("Creating Mnesia~stable '~s'", [Type, Name]),
case mnesia_op(create_table, [Name, TabDef]) of
{atomic, ok} ->
add_table_copy(Name);