diff options
| author | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2016-05-10 11:48:30 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2016-05-10 11:48:30 +0200 |
| commit | 79e216827b308902039fbcd60bad017148580a7a (patch) | |
| tree | 9bdac8752bd4ef281ab6b1bd44a2891122e909b9 | |
| parent | f6530d0bb3dacf62d0ef2bbb9bb579aa6ffe2104 (diff) | |
| parent | 7f348db0dffb443baf4468aa038d3888819b8132 (diff) | |
| download | rabbitmq-server-git-79e216827b308902039fbcd60bad017148580a7a.tar.gz | |
Merge pull request #786 from binarin/rabbitmq-server-scary-plugins-warning
Don't scare ops with empty list of failed plugins
| -rw-r--r-- | src/rabbit_plugins.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 8f7319182e..47574a9d55 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -253,8 +253,7 @@ prepare_plugins(Enabled) -> Wanted = dependencies(false, Enabled, AllPlugins), WantedPlugins = lookup_plugins(Wanted, AllPlugins), {ValidPlugins, Problems} = validate_plugins(WantedPlugins), - %% TODO: error message formatting - rabbit_log:warning(format_invalid_plugins(Problems)), + maybe_warn_about_invalid_plugins(Problems), case filelib:ensure_dir(ExpandDir ++ "/") of ok -> ok; {error, E2} -> throw({error, {cannot_create_plugins_expand_dir, @@ -266,6 +265,13 @@ prepare_plugins(Enabled) -> PluginAppDescPath <- filelib:wildcard(ExpandDir ++ "/*/ebin/*.app")], Wanted. +maybe_warn_about_invalid_plugins([]) -> + ok; +maybe_warn_about_invalid_plugins(InvalidPlugins) -> + %% TODO: error message formatting + rabbit_log:warning(format_invalid_plugins(InvalidPlugins)). + + format_invalid_plugins(InvalidPlugins) -> lists:flatten(["Failed to enable some plugins: \r\n" | [format_invalid_plugin(Plugin) |
