AddLogEntry() private method

private AddLogEntry ( Aspect who, EntryType entryType, string category, string format ) : void
who Aspect
entryType EntryType
category string
format string
return void
Beispiel #1
0
        /// <summary>
        ///     Adds log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing,
        ///     sorting, grouping, etc.
        /// </summary>
        /// <param name="methodLogger"></param>
        /// <param name="entryType"></param>
        /// <param name="category"></param>
        /// <param name="format"></param>
        /// <param name="args"></param>
        public static void Log(this IMethodLogProvider methodLogger, EntryType entryType, string category, string format, params object[] args)
        {
            if (methodLogger == null)
            {
                if (CallLifetimeLog.FallbackToTraceLoggingWhenNoProxy)
                {
                    FallbackTraceLog(entryType, format, args);
                }

                return;
            }

            CallLifetimeLog log = (CallLifetimeLog)methodLogger;

            log.AddLogEntry(LogEntryOriginator.Method, entryType, category, format, args);
        }