~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/errmsg_stderr/errmsg_stderr.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 19:25:23 UTC
  • mfrom: (1410 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326192523-ibjlbt1p692vobtj
merging with trunk

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
}