~stewart/drizzle/embedded-innodb-rnd-read

« back to all changes in this revision

Viewing changes to plugin/errmsg_stderr/errmsg_stderr.cc

  • Committer: Stewart Smith
  • Date: 2010-03-30 13:09:42 UTC
  • mfrom: (1310.1.38)
  • Revision ID: stewart@flamingspork.com-20100330130942-859uivdm20p36sk3
Merged embedded-innodb-write-row into embedded-innodb-rnd-read.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <drizzled/plugin/error_message.h>
22
22
#include <drizzled/gettext.h>
23
23
#include <drizzled/plugin.h>
24
 
#include <drizzled/plugin/registry.h>
25
24
 
26
25
#include <stdio.h>  /* for vsnprintf */
27
26
#include <stdarg.h>  /* for va_list */
56
55
};
57
56
 
58
57
static Error_message_stderr *handler= NULL;
59
 
static int errmsg_stderr_plugin_init(plugin::Registry &registry)
 
58
static int errmsg_stderr_plugin_init(plugin::Context &context)
60
59
{
61
60
  handler= new Error_message_stderr();
62
 
  registry.add(handler);
63
 
 
64
 
  return 0;
65
 
}
66
 
 
67
 
static int errmsg_stderr_plugin_deinit(plugin::Registry &registry)
68
 
{
69
 
 
70
 
  if (handler)
71
 
  {
72
 
    registry.remove(handler);
73
 
    delete handler;
74
 
  }
 
61
  context.add(handler);
 
62
 
75
63
  return 0;
76
64
}
77
65
 
84
72
  N_("Error Messages to stderr"),
85
73
  PLUGIN_LICENSE_GPL,
86
74
  errmsg_stderr_plugin_init,
87
 
  errmsg_stderr_plugin_deinit,
88
75
  NULL, /* system variables */
89
76
  NULL
90
77
}