~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_syslog/logging_syslog.cc

  • Committer: Brian Aker
  • Date: 2009-11-18 06:11:12 UTC
  • mfrom: (1220.1.10 staging)
  • Revision ID: brian@gaz-20091118061112-tyf4qrfr5v7i946b
Monty + Brian Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
  
137
137
    /* to avoid trying to printf %s something that is potentially NULL */
138
138
  
139
 
    const char *dbs= (session->db) ? session->db : "";
140
 
    int dbl= 0;
141
 
    if (dbs)
142
 
      dbl= session->db_length;
 
139
    const char *dbs= session->db.empty() ? "" : session->db.c_str();
143
140
  
144
141
    const char *qys= (session->getQueryString()) ? session->getQueryString() : "";
145
142
    int qyl= 0;
156
153
           " tmp_table=%ld total_warn_count=%ld\n",
157
154
           (unsigned long) session->thread_id,
158
155
           (unsigned long) session->getQueryId(),
159
 
           dbl, dbs,
 
156
           (int)session->db.length(), dbs,
160
157
           qyl, qys,
161
158
           (int) command_name[session->command].length,
162
159
           command_name[session->command].str,
273
270
  NULL
274
271
};
275
272
 
276
 
drizzle_declare_plugin(logging_syslog)
 
273
drizzle_declare_plugin
277
274
{
278
275
  "logging_syslog",
279
276
  "0.2",