PHP: Prevent the same error from being logged?
<p>I've checked <code>ignore_repeated_errors</code> ini directive but it appears to deal only with the same error on the same file. It will still log the error if the php file was run by multiple users.</p>

<p>What I'm looking for is a solution that would prevent the same error from being logged if it's already present in the log file. So even if the error happens to several users it should only reflect one error in the log.</p>

<p>What's the best way to achieve this?</p>

<p>Edit: From the time being, it seems the only way to achieve this is to use a custom error handler then check whether the same message exist before logging the error.</p>
