예제 #1
0
        protected void AddAction()
        {
            HandlerAction action = HandlerAction.Acquire();

            action.session = this;
            _loop.Execute(action.emit);
        }
예제 #2
0
        protected void AddAction(int length)
        {
            HandlerAction action = HandlerAction.Acquire();

            action.session = this;
            action.length  = length;
            _loop.Execute(action.emit);
        }
예제 #3
0
        protected void AddAction(Request request)
        {
            HandlerAction action = HandlerAction.Acquire();

            action.session = this;
            action.request = request;
            _loop.Execute(action.emit);
        }
예제 #4
0
        private void AddAction(Exception e)
        {
            HandlerAction action = HandlerAction.Acquire();

            action.server    = this;
            action.exception = e;
            _loop.Execute(action.emit);
        }
예제 #5
0
        private void AddAction(Socket socket)
        {
            HandlerAction action = HandlerAction.Acquire();

            action.server = this;
            action.socket = socket;
            _loop.Execute(action.emit);
        }
예제 #6
0
파일: Log.cs 프로젝트: libla/ULog
 public static void Exception(Exception e)
 {
     if (!initialized)
     {
         throw new InvalidOperationException();
     }
     if (thread_init && threadID == Thread.CurrentThread.ManagedThreadId)
     {
         ExecWrite(DateTime.Now, e, GetStackTrace(Level.Error, e));
     }
     else
     {
         HandlerAction action = HandlerAction.Acquire();
         action.datetime  = DateTime.Now;
         action.exception = e;
         action.stacks    = GetStackTrace(Level.Error, e);
         lock (actions_mtx)
         {
             actions.Add(action);
         }
     }
 }
예제 #7
0
파일: Log.cs 프로젝트: libla/ULog
 private static void Write(Level level, string text)
 {
     if (!initialized)
     {
         throw new InvalidOperationException();
     }
     if (thread_init && threadID == Thread.CurrentThread.ManagedThreadId)
     {
         ExecWrite(DateTime.Now, level, text, GetStackTrace(level, 2));
     }
     else
     {
         HandlerAction action = HandlerAction.Acquire();
         action.datetime = DateTime.Now;
         action.level    = level;
         action.text     = text;
         action.stacks   = GetStackTrace(level, 2);
         lock (actions_mtx)
         {
             actions.Add(action);
         }
     }
 }