diff --git a/src/Moq/Interception/CastleProxyFactory.cs b/src/Moq/Interception/CastleProxyFactory.cs index 5bca46b2d..a28574fcd 100644 --- a/src/Moq/Interception/CastleProxyFactory.cs +++ b/src/Moq/Interception/CastleProxyFactory.cs @@ -14,6 +14,7 @@ using System.Text; #endif +using Castle.Core.Logging; using Castle.DynamicProxy; using Moq.Internals; @@ -34,6 +35,8 @@ public CastleProxyFactory() { this.generationOptions = new ProxyGenerationOptions { Hook = new IncludeObjectMethodsHook(), BaseTypeForInterfaceProxy = typeof(InterfaceProxy) }; this.generator = new ProxyGenerator(); + (this.generator.Logger as TraceLogger)?.Level = LoggerLevel.Warn; + this.classGenerators = new ConcurrentDictionary(); }