Example #1
0
 internal LogEntry(string thread, string source, LogLevel level, string message, Exception error, DateTime time)
 {
     this.thread = thread;
     this.message = message;
     this.time = time;
     this.level = level;
     this.source = source;
     this.error = error;
 }
Example #2
0
        public bool IsInterestedIn(LogLevel level)
        {
            for (int i = 0; i < loggers.Count; i++) {
                ILogger logger = loggers[i];
                if (logger != null && logger.IsInterestedIn(level))
                    return true;
            }

            return false;
        }
Example #3
0
        internal EventLog(int eventClass, int eventCode, object source, LogLevel level, string database, string userName, string remoteAddress, string message, Exception exception)
        {
            EventClass = eventClass;
            EventCode = eventCode;
            Source = source;
            Level = level;
            Database = database;
            UserName = userName;
            RemoteAddress = remoteAddress;
            Message = message;
            Exception = exception;

            // TODO: Get this from the event?
            TimeStamp = DateTime.UtcNow;
        }
Example #4
0
 public bool IsInterestedIn(LogLevel level)
 {
     return false;
 }
Example #5
0
 public void Log(LogLevel level, Exception e)
 {
     Log(new LogEntry(null, GetLoggingType().AssemblyQualifiedName, level, null, e, DateTime.Now));
 }
Example #6
0
 public void Log(LogLevel level, string message)
 {
     Log(new LogEntry(null, GetLoggingType().AssemblyQualifiedName, level, message, null, DateTime.Now));
 }
Example #7
0
 public void Log(LogLevel level, string typeString, string message, Exception error)
 {
     Log(new LogEntry(null, typeString, level, message, error, DateTime.Now));
 }
Example #8
0
 public void Log(LogLevel level, Type type, string message, Exception error)
 {
     Log(new LogEntry(null, type.AssemblyQualifiedName, level, message, error, DateTime.Now));
 }
Example #9
0
 public void Log(LogLevel level, object ob, string message, Exception error)
 {
     Log(new LogEntry(null, ob.GetType().AssemblyQualifiedName, level, message, error, DateTime.Now));
 }
Example #10
0
 public void Log(LogLevel level, string typeString, string message)
 {
     Log(new LogEntry(null, typeString, level, message, null, DateTime.Now));
 }
Example #11
0
 public bool IsInterestedIn(LogLevel level)
 {
     return BaseLogger.IsInterestedIn(level);
 }
Example #12
0
 public void Log(LogLevel level, string type_string, string message)
 {
     if (IsInterestedIn(level)) {
         // InternalWrite(output, level, type_string, message);
         Thread thread = Thread.CurrentThread;
         Log(new LogEntry(thread.Name, type_string, level, message, null, DateTime.Now));
     }
 }
Example #13
0
 public void Log(LogLevel level, Type type, string message)
 {
     Log(level, type.FullName, message);
 }
Example #14
0
 public void Log(LogLevel level, object ob, string message)
 {
     Log(level, ob.GetType().Name, message);
 }
Example #15
0
 public bool IsInterestedIn(LogLevel level)
 {
     return (level >= debug_level);
 }
 public bool IsInterestedIn(LogLevel level)
 {
     return true;
 }