Merge lp:~vjsamuel/drizzle/rplugin-rabbitmq into lp:~drizzle-trunk/drizzle/development

Proposed by Vijay Samuel
Status: Merged
Merged at revision: 1686
Proposed branch: lp:~vjsamuel/drizzle/rplugin-rabbitmq
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 42 lines (+13/-2)
2 files modified
plugin/rabbitmq/rabbitmq_log.cc (+12/-1)
plugin/rabbitmq/tests/t/variables-master.opt (+1/-1)
To merge this branch: bzr merge lp:~vjsamuel/drizzle/rplugin-rabbitmq
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+31607@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/rabbitmq/rabbitmq_log.cc'
2--- plugin/rabbitmq/rabbitmq_log.cc 2010-06-23 20:51:16 +0000
3+++ plugin/rabbitmq/rabbitmq_log.cc 2010-08-03 05:57:46 +0000
4@@ -31,6 +31,10 @@
5 #include <drizzled/plugin.h>
6 #include <stdint.h>
7 #include "rabbitmq_handler.h"
8+#include <boost/program_options.hpp>
9+#include <drizzled/module/option_map.h>
10+
11+namespace po= boost::program_options;
12
13 using namespace std;
14 using namespace drizzled;
15@@ -250,6 +254,13 @@
16 NULL, /* update func*/
17 DEFAULT_USE_REPLICATOR /* default */);
18
19+static void init_options(drizzled::module::option_context &context)
20+{
21+ context ("enable",
22+ po::value<bool>(&sysvar_rabbitmq_log_enabled)->default_value(false)->zero_tokens(),
23+ N_("Enable rabbitmq log"));
24+}
25+
26 static drizzle_sys_var* system_variables[]= {
27 DRIZZLE_SYSVAR(enable),
28 DRIZZLE_SYSVAR(hostname),
29@@ -263,5 +274,5 @@
30 NULL
31 };
32
33-DRIZZLE_PLUGIN(init, system_variables, NULL);
34+DRIZZLE_PLUGIN(init, system_variables, init_options);
35
36
37=== modified file 'plugin/rabbitmq/tests/t/variables-master.opt'
38--- plugin/rabbitmq/tests/t/variables-master.opt 2010-04-07 01:45:18 +0000
39+++ plugin/rabbitmq/tests/t/variables-master.opt 2010-08-03 05:57:46 +0000
40@@ -1,1 +1,1 @@
41---plugin-add=rabbitmq --rabbitmq-enable --rabbitmq-host=serialcoder --rabbitmq-username=guest --rabbitmq-password=guest
42+--plugin-add=rabbitmq --rabbitmq.enable --rabbitmq-host=serialcoder --rabbitmq-username=guest --rabbitmq-password=guest