OSSP CVS Repository

ossp - Check-in [2356]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2356
Date: 2002-Jul-25 16:05:57 (local)
2002-Jul-25 14:05:57 (UTC)
User:thl
Branch:
Comment: improve tracing message when hunting for sections
Tickets:
Inspections:
Files:
ossp-pkg/fsl/fsl.c      1.22 -> 1.23     7 inserted, 1 deleted

ossp-pkg/fsl/fsl.c 1.22 -> 1.23

--- fsl.c        2002/07/25 10:14:03     1.22
+++ fsl.c        2002/07/25 14:05:57     1.23
@@ -495,7 +495,13 @@
                     fsldebug(L2_LEVEL_ERROR, "pcre_study() failed with error %s\n", cpError); CU(1); }
 
                 nMatch = pcre_exec(pcreRegex, pcreExtra, cpISF, strlen(cpISF), 0, 0, ovec, OVECSIZE);
-                fsldebug(L2_LEVEL_TRACE, "found %2d matches when \"%s\" is used against \"%s\"\n", nMatch, argmatch, cpISF);
+                if (nMatch < 0)
+                    fsldebug(L2_LEVEL_TRACE, "matching ident/facility \"%s\" against section \"%s\" failed.\n", cpISF, argmatch);
+                else
+                    if (nMatch == 0)
+                        fsldebug(L2_LEVEL_TRACE, "matching ident/facility \"%s\" against section \"%s\" succeeded, found $0\n", cpISF, argmatch);
+                    else
+                        fsldebug(L2_LEVEL_TRACE, "matching ident/facility \"%s\" against section \"%s\" succeeded, found $0...$%d\n", cpISF, argmatch, (nMatch-1) > 9 ? 9 : (nMatch-1));
                 if (nMatch >= 1) {
                     pcre_get_substring_list(cpISF, ovec, nMatch, &acpMatch);
                     if (acpMatch != NULL)

CVSTrac 2.0.1