Add support for custom error_log

improved the logic to support custom error_log messages.

Add a new parameter to pool.pp log_errors and keep the same defaults/logic to support backward compatibility
indeed, cherry picked a previous commit for the PR, let me send the correct one.