示例#1
0
        public static ILogScope WithCorrelationHandle(this ILogScope scope, [NotNull] object correlationHandle)
        {
            if (correlationHandle == null)
            {
                throw new ArgumentNullException(nameof(correlationHandle));
            }

            return(scope.With(nameof(WithCorrelationHandle), correlationHandle));
        }
示例#2
0
 public static ILogScope WithCorrelationContext(this ILogScope scope, object correlationContext)
 {
     return(scope.With("CorrelationContext", correlationContext));
 }
示例#3
0
 public static ILogScope WithCorrelationId(this ILogScope scope, object correlationId)
 {
     return(scope.With("CorrelationId", correlationId));
 }
示例#4
0
 /// <summary>
 /// Attaches elapsed-milliseconds to each log.
 /// </summary>
 public static ILogScope AttachElapsed(this ILogScope scope)
 {
     return(scope.With(new ElapsedMilliseconds(nameof(Elapsed))));
 }
示例#5
0
 public static ILogScope WithRoutine(this ILogScope scope, string identifier)
 {
     return(scope.With(nameof(WithRoutine), identifier));
 }