~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/error.cc

  • Committer: Brian Aker
  • Date: 2011-10-19 19:30:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2444.
  • Revision ID: brian@tangent.org-20111019193054-pxnb4hflrmbfhmbm
Fix level_t to be more inline with syslog

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
{
88
88
  switch (_verbosity)
89
89
  {
 
90
  case error::ALERT:
 
91
    {
 
92
      static std::string _arg= "ALERT";
 
93
      return _arg;
 
94
    }
 
95
  case error::EMERG:
 
96
    {
 
97
      static std::string _arg= "EMERG";
 
98
      return _arg;
 
99
    }
 
100
  case error::CRITICAL:
 
101
    {
 
102
      static std::string _arg= "CRITICAL";
 
103
      return _arg;
 
104
    }
90
105
  case error::INSPECT:
91
106
    {
92
107
      static std::string _arg= "INSPECT";
103
118
      return _arg;
104
119
    }
105
120
  case error::ERROR:
106
 
    {
107
 
      static std::string _arg= "ERROR";
108
 
      return _arg;
109
 
    }
 
121
    break;
110
122
  }
111
123
 
112
 
  abort();
 
124
  static std::string _arg= "ERROR";
 
125
  return _arg;
113
126
}
114
127
 
115
128
error::level_t &verbosity()
131
144
  {
132
145
    _verbosity= error::WARN;
133
146
  }
134
 
  else if (not arg.compare("ERROR"))
135
 
  {
136
 
    _verbosity= error::ERROR;
137
 
  }
 
147
  else if (not arg.compare("EMERG"))
 
148
  {
 
149
    _verbosity= error::EMERG;
 
150
  }
 
151
  else if (not arg.compare("CRITICAL"))
 
152
  {
 
153
    _verbosity= error::CRITICAL;
 
154
  }
 
155
  else if (not arg.compare("ALERT"))
 
156
  {
 
157
    _verbosity= error::ALERT;
 
158
  }
 
159
 
 
160
  _verbosity= error::ERROR;
138
161
}
139
162
 
140
163
} // namespace error