Mike,
I dont the particulars but I know there is a way in netweaver at a basis/config level where you can trigger an alert or email based on if a pattern you set appears in the logs.
On a programmatic level there is an sap logging api but I havent looked at it in may years and it looks like it changed some. I know you can read and filter the logs but it is very slow because the logs are all in flat files. I think there was also a way to attach an event listener to fire if a certain message appears in the log.
http://help.sap.com/javadocs/NW73/SPS11/CE/en/com.sap.en/index.html
Regards,
Christian