示例#1
0
文件: Logger.cs 项目: nlhans/Triton
        public void Add(LogMessage m)
        {
            _Messages.Add(m);

            Config.Notify(m);
        }
示例#2
0
文件: Logger.cs 项目: nlhans/Triton
 internal void Notify(LogMessage m)
 {
     if (LogNotifiers != null)
         LogNotifiers(m);
 }
示例#3
0
文件: Logger.cs 项目: nlhans/Triton
 public static LogInstance GetInstance(LogMessage m)
 {
     return GetByAssembly(m.Assembly);
 }
示例#4
0
文件: Logger.cs 项目: nlhans/Triton
        private static void _StoreLog(Assembly assem, string message, object sender)
        {
            LogMessage m = new LogMessage();
            m.StackTrace = new StackTrace();
            m.Message = message;
            m.Time = DateTime.Now;
            m.Assembly = assem;
            m.Sender = sender;

            if (sender != null)
                m._Trace_FrameNo++;

            if (GetByAssembly(assem) == null)
                CreateInstance(assem, new LoggerConfiguration());

            GetByAssembly(assem).Add(m);
        }
示例#5
0
文件: Logger.cs 项目: nlhans/Triton
 public static LoggerConfiguration GetConfiguration(LogMessage m)
 {
     LogInstance inst = GetByAssembly(m.Assembly);
     return inst.Config;
 }