Example #1
0
        private bool ShouldLog(IMethodInvocation invocation)
        {
            if (!logger.IsDebugEnabled) {
                return false;
            }

            var instanceIsLoggable = invocation.GetInstanceMethodInfo().IsLoggable();
            var targetIsLoggable = invocation.Target.GetType().IsLoggable();

            return instanceIsLoggable && targetIsLoggable;
        }