Ignore:
Timestamp:
Apr 30, 2010, 11:55:18 PM (15 years ago)
Author:
katerina
Message:

Fix for tickets #200 to #206 (kernel check, login checks, bugfixes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_err_syslog.c

    r170 r279  
    131131}
    132132 
    133  
     133static int sh_stamp_priority = LOG_ERR;
     134
     135/* set priority for heartbeat messages
     136 */
     137int  sh_log_set_stamp_priority (const char * c)
     138{
     139  int retval = 0;
     140
     141  if      (0 == strcmp(c, _("LOG_DEBUG")))   { sh_stamp_priority = LOG_DEBUG; }
     142  else if (0 == strcmp(c, _("LOG_INFO")))    { sh_stamp_priority = LOG_INFO;  }
     143  else if (0 == strcmp(c, _("LOG_NOTICE")))  { sh_stamp_priority = LOG_NOTICE;}
     144  else if (0 == strcmp(c, _("LOG_WARNING"))) { sh_stamp_priority = LOG_WARNING;}
     145  else if (0 == strcmp(c, _("LOG_ERR")))     { sh_stamp_priority = LOG_ERR;   }
     146  else if (0 == strcmp(c, _("LOG_CRIT")))    { sh_stamp_priority = LOG_CRIT;  }
     147  else if (0 == strcmp(c, _("LOG_ALERT")))   { sh_stamp_priority = LOG_ALERT; }
     148#ifdef LOG_EMERG
     149  else if (0 == strcmp(c, _("LOG_EMERG")))   { sh_stamp_priority = LOG_EMERG; }
     150#endif
     151  else { retval = -1; }
     152
     153  return retval;
     154
    134155
    135156/* syslog error message
     
    154175  else if (severity == SH_ERR_NOTICE) priority = LOG_NOTICE;
    155176  else if (severity == SH_ERR_WARN)   priority = LOG_WARNING;
    156   else if (severity == SH_ERR_STAMP)  priority = LOG_ERR;
     177  else if (severity == SH_ERR_STAMP)  priority = sh_stamp_priority;
    157178  else if (severity == SH_ERR_ERR)    priority = LOG_ERR;
    158179  else if (severity == SH_ERR_SEVERE) priority = LOG_CRIT;
Note: See TracChangeset for help on using the changeset viewer.