An application development team that I am working with has designed a generic logging application which captures exceptions to a single repository (msql2008r2) for later review. This team would like any database exceptions to be routed to the same repository. As it stands, the web applications use a WCF service to write the messages out to the repository. In some cases, an application that has failed due to something like an insert attempt with an absent/incorrect foreign key will get included with the application's message by de facto, however, there are cases where SQL Agent Jobs execute stored procedures which pertain to these applications, that do not record to the repository.
I realize it is possible for me to use a CLR client w/method calls to the existing WCF service. I suppose It would also be possible for me to invoke another stored proc within a stored proc that generacizes the error into the logging format, then writes to the repository directly without passing through the service. In any case, I am interested in this group's thoughts on what the best approach might be.