Esempio n. 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));
        }
Esempio n. 2
0
 public static ILogScope WithCorrelationContext(this ILogScope scope, object correlationContext)
 {
     return(scope.With("CorrelationContext", correlationContext));
 }
Esempio n. 3
0
 public static ILogScope WithCorrelationId(this ILogScope scope, object correlationId)
 {
     return(scope.With("CorrelationId", correlationId));
 }
Esempio n. 4
0
 /// <summary>
 /// Attaches elapsed-milliseconds to each log.
 /// </summary>
 public static ILogScope AttachElapsed(this ILogScope scope)
 {
     return(scope.With(new ElapsedMilliseconds(nameof(Elapsed))));
 }
Esempio n. 5
0
 public static ILogScope WithRoutine(this ILogScope scope, string identifier)
 {
     return(scope.With(nameof(WithRoutine), identifier));
 }