~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log.cc

  • Committer: Monty Taylor
  • Date: 2008-12-11 07:51:00 UTC
  • mfrom: (670.3.3 remove-my-stpncpy)
  • mto: This revision was merged to the branch mainline in revision 672.
  • Revision ID: monty@inaugust.com-20081211075100-1jaqspnugi2u87u0
MergedĀ fromĀ Toru.

Show diffs side-by-side

added added

removed removed

Lines of Context:
502
502
 
503
503
  if (log_type == LOG_NORMAL)
504
504
  {
505
 
    char *end;
506
 
    int len=snprintf(buff, sizeof(buff), "%s, Version: %s (%s). "
507
 
                     "started with:\nTCP Port: %d, Named Pipe: %s\n",
508
 
                     my_progname, server_version, COMPILATION_COMMENT,
509
 
                     drizzled_port, ""
510
 
                     );
511
 
    end= my_stpncpy(buff + len, "Time                 Id Command    Argument\n",
512
 
                 sizeof(buff) - len);
513
 
    if (my_b_write(&log_file, (unsigned char*) buff, (uint) (end-buff)) ||
514
 
        flush_io_cache(&log_file))
 
505
    int len= snprintf(buff, sizeof(buff), "%s, Version: %s (%s). "
 
506
                      "started with:\nTCP Port: %d, Named Pipe: %s\n",
 
507
                      my_progname, server_version, COMPILATION_COMMENT,
 
508
                      drizzled_port, "");
 
509
    len+= sprintf(buff+len, "Time                 Id Command    Argument\n");
 
510
 
 
511
    if (my_b_write(&log_file, (unsigned char*) buff, len) ||
 
512
        flush_io_cache(&log_file))
515
513
      goto err;
516
514
  }
517
515
 
1602
1600
  uint32_t dir_len = dirname_length(log_file_name);
1603
1601
  if (dir_len >= FN_REFLEN)
1604
1602
    dir_len=FN_REFLEN-1;
1605
 
  my_stpncpy(buf, log_file_name, dir_len);
 
1603
  strncpy(buf, log_file_name, dir_len);
1606
1604
  strncpy(buf+dir_len, log_ident, FN_REFLEN - dir_len -1);
1607
1605
}
1608
1606