~mordred/drizzle/sqlalchemy-tests

« back to all changes in this revision

Viewing changes to drizzled/plugin/error_message.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 00:26:12 UTC
  • mfrom: (2187.2.3 drizzle-build)
  • Revision ID: brian@tangent.org-20110222002612-5vxuzntgmcog0qq6
Merge: This cleans up the the error message system by providing for the ability to

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include <config.h>
 
21
 
 
22
#include <drizzled/error.h>
 
23
#include <drizzled/gettext.h>
21
24
#include <drizzled/plugin/error_message.h>
22
25
 
23
 
#include <drizzled/gettext.h>
24
 
 
25
26
#include <cstdio>
26
27
#include <algorithm>
27
28
#include <vector>
85
86
 
86
87
bool plugin::ErrorMessage::vprintf(error::level_t priority, char const *format, va_list ap)
87
88
{
 
89
  if (not (priority >= error::verbosity()))
 
90
    return false;
88
91
 
89
92
  /* 
90
93
    Check to see if any errmsg plugin has been loaded
96
99
       (single writes are atomic), then this needs to be rewritten to
97
100
       vsprintf into a char buffer, and then write() that char buffer
98
101
       to stderr */
99
 
    vfprintf(stderr, format, ap);
100
 
    fputc('\n', stderr);
 
102
      vfprintf(stderr, format, ap);
 
103
      fputc('\n', stderr);
101
104
    return false;
102
105
  }
103
106