Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Apache: Log: how to log only certain errors?



>From: Stoyan Zhekov <sto@example.com>

[some links]

I *did* read the links you provided before posting ... they didn't quite 
answer my problem.

>"So, if you're trying to keep a log of all the broken links on your site, 
>you might have the following:
>
>LogFormat %404{Referer}i BrokenLinks
>"
>
>The sentence above is from:
>http://apachetoday.com/news_story.php3?ltsn=2000-09-05-001-01-NW-LF-SW

Yes, and if you read just a bit above that sentence you will see:

"If, between the % and the variable, you put one or more HTTP status codes, 
the variable will only be logged in the event that the request returns one 
of those status codes."

So this only works for status codes ... what about if I only want to log 
requests between 1am and 3am and only those that returned more than 10k?

Furthermore I think your suggestion will not work anyway. If the status code 
is NOT 404 an empty line will be written to the log file. So I'll end up 
with a log file full of empty lines (non 404 return codes) and some lines 
with information (404 errors). (I'm not 100% sure of this but I think I 
tried it before and that is what happened).

Thanks offering some help though!

Jc

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links