Exemple #1
0
        public void AddNewEvent(
            string functionName,
            long v_executionTime,
            _EventDetail eventDetail,
            RequestInfo info = null
            )
        {
            MyEvent evnt = new MyEvent();

            evnt.ControllerName     = eventDetail.ControllerName;
            evnt.MethodName         = eventDetail.MethodName;
            evnt.EventSource        = eventDetail.EventSource;
            evnt.ExecutionTime      = v_executionTime;
            evnt.EventDate          = DateTime.Now;
            evnt.FunctionName       = functionName;
            evnt.OperationIdUserRef = info.IdUserRef;
            evnt.OperationDate      = DateTime.Now;
            evnt.OperationIsDeleted = _Enumeration._TypeOperationIsDeleted.UnDeleted;
            evnt.OperationIP        = info.OperationIP;
            evnt.MachineName        = info.MachineName;
            evnt.MachineIp          = info.MachineIP;
            evnt.ClientBrowser      = info.ClientBrowser;

            Derin_Logging.WriteToEventQueue(Derin_Logging.Type.Event, SerializeObject(evnt));
        }
Exemple #2
0
        protected static void Save(int errorCode, string errorMessage, string functionCode)
        {
            MyException ex = new MyException();

            ex.FunctionName       = functionCode;
            ex.ErrorCode          = errorCode;
            ex.ExceptionSource    = errorMessage;
            ex.ControllerName     = "";
            ex.MethodName         = "";
            ex.OperationIdUserRef = SessionVariable._IdUserRef;
            ex.OperationIP        = SessionVariable._OperationIP;
            ex.OperationIsDeleted = 1;
            ex.MachineName        = SessionVariable._MachineName;
            ex.MachineIp          = SessionVariable._MachineIp;
            ex.ClientBrowser      = SessionVariable._ClientBrowser;

            Derin_Logging.WriteToQueue(Derin_Logging.Type.Exception, SerializeObject(ex));
        }