~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/errmsg_print.cc

Merged in plugin-slot-reorg patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
*/
24
24
 
25
25
#include <drizzled/server_includes.h>
26
 
#include <drizzled/errmsg.h>
 
26
#include <drizzled/plugin/registry.h>
27
27
#include <drizzled/errmsg_print.h>
28
28
#include <drizzled/current_session.h>
29
29
 
30
30
// need this for stderr
31
31
#include <string.h>
32
32
 
 
33
using namespace drizzled;
 
34
 
33
35
void sql_perror(const char *message)
34
36
{
35
37
  // is stderr threadsafe?
38
40
 
39
41
bool errmsg_printf (int priority, char const *format, ...)
40
42
{
 
43
  plugin::Registry &plugins= plugin::Registry::singleton();
41
44
  bool rv;
42
45
  va_list args;
43
46
  va_start(args, format);
44
 
  rv= errmsg_vprintf(current_session, priority, format, args);
 
47
  rv= plugins.error_message.vprintf(current_session, priority, format, args);
45
48
  va_end(args);
46
49
  return rv;
47
50
}