Post Reply 
How to trigger a log entry
Aug. 21, 2011, 12:17 AM
Post: #1
How to trigger a log entry
I've created a new log file to use for showing if/when selected filters are used. The entries should list: filter name, date/time, and the url that triggered the filter. So far, not much success. Reading the 5 sentences the Matching Commands section devotes to $ADDLST gets me to $ADDLST(ListName,filtername), but doesn't help with the rest.

Looking at existing filters, it seems that putting $ADDLST(New-Log,filtername,[$DTM(d T)]) in the URL Match box might work but that seems to generate a line whether the filter is used or not.

Also, is there a way to use the log to count the number of times a filter is used rather than list it each time?
Add Thank You Quote this message in a reply
Aug. 21, 2011, 04:04 PM
Post: #2
RE: How to trigger a log entry
Quote:seems to generate a line whether the filter is used or not.

$ADDLST runs when the Proxomitron sees it. Put it before all conditional statements and it always runs. Put it after all the conditional statements and it will only run when there is a filter (or routine) match.

Quote:Also, is there a way to use the log to count the number of times a filter is used rather than list it each time?

I can think of two ways. Both are hard to explain and not extensively tested. One is messy. Messy requires lists that never match and are dynamic.
The other would require filtering a Proxomitron generated page.

Probably best to use a list and then simply read the stats in "What the Proxomitron is thinking..." Consider http://local.ptron/.pinfo/lists/Bypass or http://local.ptron/.pinfo/lists/Bypass-List . It shows the number of times "local.ptron" was scanned (Scans) and found (Hits).
Your list would contain the filters' names. Your filters would contain a call to the list after the filters' conditional statements were matched.
Add Thank You Quote this message in a reply
Aug. 21, 2011, 07:36 PM
Post: #3
RE: How to trigger a log entry
Ah... that makes sense. I've now put it after everything in the Replace box and it's working fine there in everything tested so far. I guessed on the URL part, coming up with this format:

$URL(http://*\1)$ADDLST(New-Log,filtername,[$DTM(d T)],\1)

Not sure if that's optimum but it's working for now.

Quote:Probably best to use a list and then simply read the stats in "What the Proxomitron is thinking..." Consider http://local.ptron/.pinfo/lists/Bypass or http://local.ptron/.pinfo/lists/Bypass-List . It shows the number of times "local.ptron" was scanned (Scans) and found (Hits).
Your list would contain the filters' names. Your filters would contain a call to the list after the filters' conditional statements were matched.

Ouch. I think that's beyond my level of expertise. I'll stick to the first idea for now. I just thought these would be useful because over time, custom configs can get a little bloated and I'd like to see which filters are really being used. Some probably aren't.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: