Paolo ponzano - 58 - Sep 14, 2014

Hello Demis,
I wish to log the exception plus the dto passed (for simplifing the buf fixing) I’ve created my own servicerunner to log but in that way I’ve got 2 entry one “mine” and the other one of the logmanager (I’m using NLog) … is there a way I can create my own exception cloning the one returned and then adding some additional fields? otherwise can I disable LogManager to log the exception of the webservices?
Thank in advance
Paolo

Wayne Brantley:

I have submitted several additional request to Demis to enhance this hooking so we do not have to copy/paste all the existing code.  He is looking into that.  Additionally,  you cannot suppress certain exceptions from being logged because the log.Error is called from inside the SS code (and I would like it to be log.Warning or .Info in some cases, etc).

Any new/additional thoughts or ideas toward this Demis? 

+paolo ponzano create a custom NLogFactory that returns a NullLogFactory for the loggers you want to ignore and a NLogLogger for everything else:
https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Logging.NLog/NLogFactory.cs