Sdl.Web.Common/Logging/Tracer.cs
/// <summary>
/// Outputs a method entry trace.
/// </summary>
/// <param name="parameters">The parameter values to include in the trace.</param>
Outputs a method entry trace.
Outputs a method entry trace .
private void TraceMethodEntry(object[] parameters)
        {
            _indent = new string(' ', _nestingLevel * 2);
            _nestingLevel++;
            string parametersString;
            string extraInfo = string.Empty;
            if (parameters == null)
            {
                parametersString = null;
            }
            else
            {
                string[] parameterStrings = parameters.Select(p => ConvertParameterToString(p)).ToArray();
                parametersString = string.Join(", ", parameterStrings.Take(_numberOfCallingMethodParams).ToArray());
                extraInfo = string.Join(", ", parameterStrings.Skip(_numberOfCallingMethodParams).ToArray());
            }
            string traceMessage = string.Format(
                "{0}{1}({2}){3} entry.",
                _indent,
                _callingMethodName,
                parametersString,
                string.IsNullOrEmpty(extraInfo) ? string.Empty : " : " + extraInfo
                );
            Log.Trace(traceMessage);
            _stopwatch.Start();
        }
private void TraceMethodEntry ( object [ ] parameters ) { _indent = new string ( ' ' , _nestingLevel * 2 ) ; _nestingLevel ++ ; string parametersString ; string extraInfo = string . Empty ; if ( parameters == null ) { parametersString = null ; } else { string [ ] parameterStrings = parameters . Select ( p => ConvertParameterToString ( p ) ) . ToArray ( ) ; parametersString = string . Join ( " " , parameterStrings . Take ( _numberOfCallingMethodParams ) . ToArray ( ) ) ; extraInfo = string . Join ( " " , parameterStrings . Skip ( _numberOfCallingMethodParams ) . ToArray ( ) ) ; } string traceMessage = string . Format ( " " , _indent , _callingMethodName , parametersString , string . IsNullOrEmpty ( extraInfo ) ? string . Empty : " " + extraInfo ) ; Log . Trace ( traceMessage ) ; _stopwatch . Start ( ) ; }
Outputs a method entry trace.
Outputs a method entry trace .
parameters
object[]
The parameter values to include in the trace.
The parameter values to include in the trace .