If you can change the utility code to add behavior, you can connect IDispatchMessageInspector and use any logging structure to log messages there. You can also see the WCF message logging function , which uses the System.Diagnostic system to do the logging (I have not used log4net yet, maybe they have some trace listener that can also be used for this).
source share