+1 for log4net.
In relation to (b), I tend to define my own custom exceptions (all derived from the same base class, for example, “BusinessException”) that raise BLLs for errors that should be passed to the user (the entry violates the business rule, user authorization fails , ...). If the BLL is deployed as a web service, these exceptions result from a SOAP error with the client error code (SOAP 1.1) / sender (SOAP 1.2).
Then at the UI level, any BusinessException or FaultException with FaultCode.IsSenderFault = true indicates that the error message should be displayed to the end user. Any other exceptions are logged and a generic message ("something bad happened") is displayed to the end user.
Personally, I believe that the distinctive messages that should be displayed to the user can be reasonably executed only depending on the application, for example above.
Regarding (c), you can write your own custom log4net file that sends serious errors to your web service (possibly asynchronously via MSMQ).
EDIT
In response to the comment, I do not know of any third-party structure that does this; we do this with a very lightweight internal framework (which also has other basic things, such as a thin provider-model API around log4net, so that our internal code is clearly independent of log4net, and we can switch to another if the best one appears, or if our application is deployed to sites where administrators prefer something else).
source share