Is there a way to block error logging from a specific set of IP's ?
Basically macafee carry out a range of testing on the server nightly and we d开发者_StackOverflow中文版on't want to record these in our error logs.
Is there a good way to avoid this from happening ?
Hope you can advice!
The easiest way that comes to mind assumes your using a error logging object of some sort. You could then add a conditional based on $_SERVER['REMOTE_ADDR'] and have it check against the IP's you list. I would store them in some sort of array that you can check with regular expression that way you can use wildcards to exempt ranges.
According to documentation, you can redirect logs into pipe, so you can easily filter your error log as you like it with your custom script or program.
You can also filter logs in phase of log-rotating.
精彩评论