]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Don't ignore lines starting with a space in access.log
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 3 Jan 2013 07:10:31 +0000 (08:10 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 3 Jan 2013 07:10:31 +0000 (08:10 +0100)
Sarg was ignoring any access.log line starting with a space character. I
see no reasons for this limitation. Therefore, I simply removed it.

Any restriction on the processed lines should be placed in the specific
format engine that requires it.

readlog.c

index b91b23928963ffbda5c5768d3e8362722355941f..33be6660bd25b0e08d469cd139aa25581d157594 100644 (file)
--- a/readlog.c
+++ b/readlog.c
@@ -47,8 +47,6 @@ enum ExcludeReasonEnum
        ER_IncompleteQuery,
        //! Log file turned over.
        ER_LogfileTurnedOver,
-       //! Line begins with a space.
-       ER_BeginWithSpace,
        //! Excluded by exclude_string from sarg.conf.
        ER_ExcludeString,
        //! Unknown input log file format.
@@ -271,10 +269,6 @@ static void ReadOneLogFile(struct ReadLogDataStruct *Filter,const char *arq)
                        excluded_count[ER_LogfileTurnedOver]++;
                        continue;
                }
-               if(linebuf[0] == ' ') {
-                       excluded_count[ER_BeginWithSpace]++;
-                       continue;
-               }
 
                // exclude_string
                if(ExcludeString[0] != '\0') {
@@ -784,7 +778,6 @@ int ReadLogFile(struct ReadLogDataStruct *Filter)
                        DisplayExcludeCount(_("User name too long"),ER_UserNameTooLong);
                        DisplayExcludeCount(_("Squid logged an incomplete query received from the client"),ER_IncompleteQuery);
                        DisplayExcludeCount(_("Log file turned over"),ER_LogfileTurnedOver);
-                       DisplayExcludeCount(_("Line begins with a space"),ER_BeginWithSpace);
                        DisplayExcludeCount(_("Excluded by \"exclude_string\" in sarg.conf"),ER_ExcludeString);
                        DisplayExcludeCount(_("Unknown input log file format"),ER_UnknownFormat);
                        DisplayExcludeCount(_("Line ignored by the input log format"),ER_FormatData);