~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/error_message.cc

  • Committer: Brian Aker
  • Date: 2011-02-01 02:51:01 UTC
  • mto: (2132.1.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2134.
  • Revision ID: brian@tangent.org-20110201025101-yaj5kkdk2towo6ou
Merge in error message rework. Many error messages are fixed in this patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
class Print : public std::unary_function<plugin::ErrorMessage *, bool>
51
51
{
52
 
  int priority;
 
52
  error::level_t priority;
53
53
  const char *format;
54
54
  va_list ap;
55
55
 
56
56
public:
57
 
  Print(int priority_arg,
 
57
  Print(error::level_t priority_arg,
58
58
        const char *format_arg, va_list ap_arg) : 
59
59
    std::unary_function<plugin::ErrorMessage *, bool>(),
60
60
    priority(priority_arg), format(format_arg)
87
87
}; 
88
88
 
89
89
 
90
 
bool plugin::ErrorMessage::vprintf(int priority, char const *format, va_list ap)
 
90
bool plugin::ErrorMessage::vprintf(error::level_t priority, char const *format, va_list ap)
91
91
{
92
92
 
93
93
  /* check to see if any errmsg plugin has been loaded
94
94
     if not, just fall back to emitting the message to stderr */
95
 
  if (!errmsg_has)
 
95
  if (not errmsg_has)
96
96
  {
97
97
    /* if it turns out that the vfprintf doesnt do one single write
98
98
       (single writes are atomic), then this needs to be rewritten to