summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Jones <paulj@lshift.net>2009-07-23 10:53:05 +0100
committerPaul Jones <paulj@lshift.net>2009-07-23 10:53:05 +0100
commit7b5b2f467397543309c13664f56f86308d578a27 (patch)
tree6b50d09304b9f8bb07bb0f3e1fcfba321b77617b
parentd9f176732b734ef1db205a25fa9b5fd65151c749 (diff)
downloadrabbitmq-server-7b5b2f467397543309c13664f56f86308d578a27.tar.gz
Added more conditional diagnostics
-rw-r--r--src/rabbit_plugin_activator.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rabbit_plugin_activator.erl b/src/rabbit_plugin_activator.erl
index 138c3572..e10ef999 100644
--- a/src/rabbit_plugin_activator.erl
+++ b/src/rabbit_plugin_activator.erl
@@ -37,7 +37,12 @@
-define(DefaultUnpackedPluginDir, "priv/plugins").
-define(DefaultRabbitEBin, "ebin").
-define(BaseApps, [rabbit]).
+-ifdef(enable_debug).
+-define(Debug(F, V), io:format("DEBUG: " ++ F, V)).
+-endif.
+-ifndef(enable_debug).
-define(Debug(_F, _V), ok).
+-endif.
-define(Error(F, V), io:format("ERROR: " ++ F, V)).
%%----------------------------------------------------------------------------
@@ -50,6 +55,9 @@ start() ->
PluginDir = get_env_or_default(plugins_dir, ?DefaultPluginDir),
UnpackedPluginDir = get_env_or_default(plugins_expand_dir, ?DefaultUnpackedPluginDir),
RabbitEBin = get_env_or_default(rabbit_ebin, ?DefaultRabbitEBin),
+ ?Debug("Got Plugin Dir ~p~n", [PluginDir]),
+ ?Debug("Got Unpacked Plugin Dir ~p~n", [UnpackedPluginDir]),
+ ?Debug("Got Rabbit EBin Dir ~p~n", [RabbitEBin]),
% Unpack any .ez plugins
unpack_ez_plugins(PluginDir, UnpackedPluginDir),