~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_gearman/logging_gearman.cc

  • Committer: Brian Aker
  • Date: 2011-01-29 23:08:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2128.
  • Revision ID: brian@tangent.org-20110129230849-ga5zr8fq1bavtygz
Merge in changes for catalogs usage of constants for identifier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
 
22
22
#include <boost/scoped_array.hpp>
23
23
 
24
24
#include <drizzled/plugin/logging.h>
25
25
#include <drizzled/gettext.h>
26
26
#include <drizzled/session.h>
27
 
#include <drizzled/errmsg_print.h>
28
27
#include <boost/date_time.hpp>
29
28
#include <boost/program_options.hpp>
30
29
#include <drizzled/module/option_map.h>
182
181
 
183
182
    if (gearman_client_create(&_gearman_client) == NULL)
184
183
    {
185
 
      drizzled::sql_perror(_("fail gearman_client_create()"));
 
184
      char errmsg[STRERROR_MAX];
 
185
      strerror_r(errno, errmsg, sizeof(errmsg));
 
186
      drizzled::errmsg_printf(ERRMSG_LVL_ERROR, _("fail gearman_client_create(): %s"),
 
187
                              errmsg);
186
188
      return;
187
189
    }
188
190
 
192
194
                                   host.c_str(), 0);
193
195
    if (ret != GEARMAN_SUCCESS)
194
196
    {
195
 
      drizzled::errmsg_printf(drizzled::error::ERROR, _("fail gearman_client_add_server(): %s"),
 
197
      drizzled::errmsg_printf(ERRMSG_LVL_ERROR, _("fail gearman_client_add_server(): %s"),
196
198
                              gearman_client_error(&_gearman_client));
197
199
      return;
198
200
    }
262
264
               session->tmp_table,
263
265
               session->total_warn_count,
264
266
               session->getServerId(),
265
 
               drizzled::getServerHostname().c_str()
 
267
               drizzled::glob_hostname
266
268
               );
267
269
  
268
270
    char job_handle[GEARMAN_JOB_HANDLE_SIZE];