RuntimeLogger.Log(new CustomLog(ssrecord));
Well, I did, but afterwards extended it a bit, so I can't share it, sorry :).
- Create a new variable/property in the soapextension class, to control whether logging is active or not
- Change the methods that are logging to check that variable
- Create a new extension method that:
- obtains the current instance of the soap extension (check how I do it to check if the soap extension is already registered)
- Set the new property on that instance to True/False
Remember that SoapExtensions run outside of a particular request (they are like Singletons in the .Net pipeline). So, if there are 2 concurrent requests, you have no guarantee that once you set it to "off" it will occur or not (if the other request is concurrently setting it to "on")… Hope it helps