示例#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="interceptedClass"></param>
        /// <param name="entryType"></param>
        /// <param name="category"></param>
        /// <param name="format"></param>
        /// <param name="args"></param>
        public static void Log(this ICallLogger interceptedClass, EntryType entryType, string category, string format, params object[] args)
        {
            if (interceptedClass == null)
            {
                if (CallLifetimeLog.FallbackToTraceLoggingWhenNoProxy)
                {
                    FallbackTraceLog(entryType, format, args);
                }

                return;
            }

            interceptedClass.AopLogger.Log(entryType, category, format, args);
        }
示例#2
0
 /// <summary>
 ///     Adds warning 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="interceptedClass"></param>
 /// <param name="format"></param>
 /// <param name="args"></param>
 public static void LogWarning(this ICallLogger interceptedClass, string format, params object[] args)
 {
     LogWarningWithKey(interceptedClass, null, format, args);
 }
示例#3
0
 /// <summary>
 ///     Adds warning 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="interceptedClass"></param>
 /// <param name="category"></param>
 /// <param name="format"></param>
 /// <param name="args"></param>
 public static void LogWarningWithKey(this ICallLogger interceptedClass, string category, string format, params object[] args)
 {
     Log(interceptedClass, EntryType.Warning, category, format, args);
 }
示例#4
0
 /// <summary>
 ///     Logs a piece of data as a log entry with key.
 /// </summary>
 /// <param name="interceptedClass"></param>
 /// <param name="key"></param>
 /// <param name="val"></param>
 public static void LogInformationData(this ICallLogger interceptedClass, string key, object val)
 {
     Log(interceptedClass, EntryType.Info, key, val.ToStringEx());
 }