~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/errmsg_stderr/errmsg_stderr.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

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(module::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
}