Beispiel #1
0
        public static void Trace(this IAsyncInterceptor interceptor, string message, IInvocation invocation, ILogger logger)
        {
            var callerClassName = invocation.TargetType.FullName;

            NLog.LogEventInfo info = new NLog.LogEventInfo(NLog.LogLevel.Trace, logger.Name, message);
            // 呼び出し元情報を設定します。
            info.SetCallerInfo(callerClassName, invocation.MethodInvocationTarget.Name, null, 0);
            logger.Log(typeof(TraceInterceptor), info);
        }