Redirect ErrorLog to a script

Hello, guys!

I need to redirect the error_log of apache web server to a script. I tried to use a pipe instead of a filename but this will cause me some troubles beacause cPanel doesn't like it. So, I would like to try something else.

Do you have any ideea on how can I read the content of the error_log file realtime? I can do a small daemon that will check from time to time the error_log file but this would be a waste of time. I need something that works realtime.

I guess that I should make error_log be a pipe to a script, but I'm not sure how to do this. Can someone give an ideea? Or do you have any ideeas on how could I read error_log realtime without having to change httpd.conf?

tail -f ?

I need the results to be processed by a script. I could use tail to get the last lines every few seconds but as error_log is pretty big this will take much time and will eat too much resources.