Ejemplo n.º 1
0
        internal void AddLogEntry(LogEntryOriginator who, EntryType entryType, string category, string format, params object[] args)
        {
            if (who == LogEntryOriginator.Aspect)
            {
                throw new ArgumentException("Parameter 'who = ' LoggerWho.Aspect cannot be used her. Use another method overload that takes Aspect class type.");
            }

            this.AddEntryIntrenal(who, null, entryType, category, format, args);
        }
Ejemplo n.º 2
0
        private void AddEntryIntrenal(LogEntryOriginator who, Type optionalAspectType, EntryType entryType, string category, string format, params object[] args)
        {
            var entry = new CallLogEntry
            {
                Who                = who,
                Key                = category,
                What               = entryType,
                Message            = format.SmartFormat(args),
                OptionalAspectType = optionalAspectType == null ? null : optionalAspectType.FormatCSharp(true),
            };

            this.callLog.Add(entry);
        }
Ejemplo n.º 3
0
        private void AddEntryIntrenal(LogEntryOriginator who, Type optionalAspectType, EntryType entryType, string category, string format, params object[] args)
        {
            var entry = new CallLogEntry
            {
                Who = who,
                Key = category,
                What = entryType,
                Message = format.SmartFormat(args),
                OptionalAspectType = optionalAspectType == null ? null : optionalAspectType.FormatCSharp(true),
            };

            this.callLog.Add(entry);
        }
Ejemplo n.º 4
0
        internal void AddLogEntry(LogEntryOriginator who, EntryType entryType, string category, string format, params object[] args)
        {
            if(who == LogEntryOriginator.Aspect)
                throw new ArgumentException("Parameter 'who = ' LoggerWho.Aspect cannot be used her. Use another method overload that takes Aspect class type.");

            this.AddEntryIntrenal(who, null, entryType, category, format, args);
        }