static void update_syslog_ident()

in plugin/server_audit/server_audit.cc [2490:2508]


static void update_syslog_ident(MYSQL_THD thd  __attribute__((unused)),
              struct SYS_VAR *var  __attribute__((unused)),
              void *var_ptr  __attribute__((unused)), const void *save)
{
  const char *new_ident= (*(const char * const*)(save)) ? *(const char * const*)(save) : empty_str;
  strncpy(syslog_ident_buffer, new_ident, sizeof(syslog_ident_buffer)-1);
  syslog_ident_buffer[sizeof(syslog_ident_buffer)-1]= 0;
  syslog_ident= syslog_ident_buffer;
  error_header();
  fprintf(stderr, "SYSYLOG ident was changed to '%s'\n", syslog_ident);
  mysql_prlock_wrlock(&lock_operations);
  mark_always_logged(thd);
  if (logging && output_type == OUTPUT_SYSLOG)
  {
    stop_logging();
    start_logging();
  }
  mysql_prlock_unlock(&lock_operations);
}