~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/errmsg_notify/errmsg_notify.cc

  • Committer: David Shrewsbury
  • Date: 2010-11-19 15:23:07 UTC
  • mto: (1942.1.3 b)
  • mto: This revision was merged to the branch mainline in revision 1943.
  • Revision ID: shrewsbury.dave@gmail.com-20101119152307-srnssq2n5num5tit
Add --replicate-query option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <cstdio>  /* for vsnprintf */
23
23
#include <stdarg.h>  /* for va_list */
24
24
#include <unistd.h>  /* for write(2) */
25
 
#include <iostream>
26
25
#include <libnotifymm.h>
27
26
#include <boost/scoped_ptr.hpp>
28
27
 
38
37
#define MAX_MSG_LEN 8192
39
38
 
40
39
using namespace drizzled;
 
40
using namespace std;
 
41
 
41
42
 
42
43
class Error_message_notify : public plugin::ErrorMessage
43
44
{
44
 
  std::vector<std::string> errmsg_tags;
 
45
  vector<string> errmsg_tags;
45
46
public:
46
47
  Error_message_notify()
47
48
   : plugin::ErrorMessage("Error_message_notify"),
77
78
      if (!n.show(error))
78
79
#endif
79
80
      {
80
 
        std::cerr << _("Failed to send error message to libnotify\n");
 
81
        fprintf(stderr, _("Failed to send error message to libnotify\n"));
81
82
        return true;
82
83
      }
83
84
#ifdef GLIBMM_EXCEPTIONS_ENABLED
84
85
     }
85
86
     catch (Glib::Error& err)
86
87
     {
87
 
       std::cerr << err.what() << std::endl;
 
88
        fprintf(stderr, err.what().c_str());
88
89
     }
89
90
#endif
90
91