***********************
** FILE NAME : irix_syslog_cooker.cpp
** SYSTEM NAME :
-** VERSION NUMBER : $Revision: 1.1 $
+** VERSION NUMBER : $Revision: 1.2 $
**
** DESCRIPTION : Cooks IRIX system log lines
**
/*****************************
$Log: irix_syslog_cooker.cpp,v $
- Revision 1.1 2003-08-11 16:56:16 arjen
+ Revision 1.2 2004-01-13 12:20:13 arjen
+ Accept '/' and '.' characters within the service name
+
+ Revision 1.1 2003/08/11 16:56:16 arjen
Different kinds of log files are parsed by a collection of objects
of different classes, derived from the base class line_cooker
Depending on the message content or the message_type element in
*****************************/
-/* static const char *RCSID = "$Id: irix_syslog_cooker.cpp,v 1.1 2003-08-11 16:56:16 arjen Exp $"; */
+/* static const char *RCSID = "$Id: irix_syslog_cooker.cpp,v 1.2 2004-01-13 12:20:13 arjen Exp $"; */
#include <ctype.h>
#include "irix_syslog_cooker.h"
static const String syslog_date_re("[[:alpha:]]{3} [ 123][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}");
-static const regex re_syslog_irix(syslog_date_re + " [0-7][A-T]:[[:alnum:]]+ [[:alpha:]]+.*:.+");
+static const regex re_syslog_irix(syslog_date_re + " [0-7][A-T]:[[:alnum:]]+ [[:alpha:]/]+.*:.+");
bool irix_syslog_cooker::check_pattern(String logline)
{
// Extract the service
rest <<= i + 1;
- for (i = 0; isalpha(rest[i]) && i < ~rest; i++);
+ for (i = 0; (isalpha(rest[i]) || rest[i] == '/' || rest[i] == '.') && i < ~rest; i++);
srv = rest(0, i);
return true;