Aspectacular.CallLifetimeLog.AddLogEntry C# (CSharp) Method

AddLogEntry() private method

private AddLogEntry ( Aspect who, EntryType entryType, string category, string format ) : void
who Aspect
entryType EntryType
category string
format string
return void
        internal void AddLogEntry(Aspect who, EntryType entryType, string category, string format, params object[] args)
        {
            if(who == null)
                throw new ArgumentNullException("who");

            this.AddEntryIntrenal(LogEntryOriginator.Aspect, who.GetType(), entryType, category, format, args);
        }

Same methods

CallLifetimeLog::AddLogEntry ( LogEntryOriginator who, EntryType entryType, string category, string format ) : void

Usage Example

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);
        }