Example #1
0
        private void LogExecutionParameters(IInvocation invocation)
        {
            if (Log.IsEnabled(LogLevel.Debug) == false)
            {
                return;
            }

            if (invocation.Arguments == null || invocation.Arguments.Length == 0)
            {
                Log.LogTrace("Method called with NO PARAMETERS.");
            }
            else
            {
                var arguments = _argumentsFormatter.FormatArguments(invocation.Arguments);
                Log.LogTrace($"Execution parameters: {arguments}");
            }
        }