From: arjen Date: Mon, 22 Dec 2003 10:22:21 +0000 (+0000) Subject: Accept a wider range of input patterns X-Git-Tag: V0_0_9~9 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=6bc39fdbb0b57e58f55ca0c3f5b866962f75953e Accept a wider range of input patterns --- diff --git a/src/gcm_input/access_cooker.cpp b/src/gcm_input/access_cooker.cpp index 5188204..03a9430 100644 --- a/src/gcm_input/access_cooker.cpp +++ b/src/gcm_input/access_cooker.cpp @@ -8,7 +8,7 @@ *********************** ** FILE NAME : access_cooker.cpp ** SYSTEM NAME : -** VERSION NUMBER : $Revision: 1.2 $ +** VERSION NUMBER : $Revision: 1.3 $ ** ** DESCRIPTION : Cooks Apache http daemon access log lines ** @@ -26,7 +26,10 @@ /***************************** $Log: access_cooker.cpp,v $ - Revision 1.2 2003-12-04 10:38:09 arjen + Revision 1.3 2003-12-22 10:22:21 arjen + Accept a wider range of input patterns + + Revision 1.2 2003/12/04 10:38:09 arjen Major redesign. All input is handled through XML. Raw input data is first transformed into an XML document for further processing. A collection of polymorphic classes handle the transformation of various @@ -45,13 +48,13 @@ *****************************/ -/* static const char *RCSID = "$Id: access_cooker.cpp,v 1.2 2003-12-04 10:38:09 arjen Exp $"; */ +/* static const char *RCSID = "$Id: access_cooker.cpp,v 1.3 2003-12-22 10:22:21 arjen Exp $"; */ #include #include "access_cooker.h" -static const regex re_accesslog("(GET|POST|HEAD) .+ HTTP"); +static const regex re_accesslog("(GET|POST|HEAD|OPTIONS|CONNECT) .+ HTTP"); bool access_cooker::check_pattern(String logline) { diff --git a/src/gcm_input/error_cooker.cpp b/src/gcm_input/error_cooker.cpp index 3179c68..a4ce102 100644 --- a/src/gcm_input/error_cooker.cpp +++ b/src/gcm_input/error_cooker.cpp @@ -8,7 +8,7 @@ *********************** ** FILE NAME : error_cooker.cpp ** SYSTEM NAME : -** VERSION NUMBER : $Revision: 1.1 $ +** VERSION NUMBER : $Revision: 1.2 $ ** ** DESCRIPTION : Cooks Apache http daemon error log lines ** @@ -26,7 +26,10 @@ /***************************** $Log: error_cooker.cpp,v $ - Revision 1.1 2003-08-11 16:56:16 arjen + Revision 1.2 2003-12-22 10:22:22 arjen + Accept a wider range of input patterns + + 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 @@ -38,14 +41,14 @@ *****************************/ -/* static const char *RCSID = "$Id: error_cooker.cpp,v 1.1 2003-08-11 16:56:16 arjen Exp $"; */ +/* static const char *RCSID = "$Id: error_cooker.cpp,v 1.2 2003-12-22 10:22:22 arjen Exp $"; */ #include #include "error_cooker.h" static const String unix_date_re("[[:alpha:]]{3} [[:alpha:]]{3} [ 123][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4}"); -static const regex re_errorlog("^\\[" + unix_date_re + "\\] \\[(error|notice)\\] .+"); +static const regex re_errorlog("^\\[" + unix_date_re + "\\] \\[(error|notice|warn)\\] .+"); bool error_cooker::check_pattern(String logline) {