Пример #1
0
 public void Test()
 {
     ElasticLogger.Configure(ELASTIC_URL, ELASTIC_INDEX, APPLICATION_ID);
     ElasticLogger.Debug(new LogModel()
     {
         registro_mensagem    = "TESTE",
         registro_codigo_erro = (int)ErroEnum.RPA.FalhaDeLogin
     });
 }
Пример #2
0
        public void TestErrorSystemException()
        {
            ElasticLogger.Configure(ELASTIC_URL, ELASTIC_INDEX, APPLICATION_ID);

            try
            {
                throw new Exception("TESTE");
            } catch (Exception e)  {
                ElasticLogger.ErrorSystemException(new LogModel()
                {
                    registro_mensagem    = "TESTE",
                    registro_codigo_erro = (int)ErroEnum.RPA.FalhaDeLogin
                }, e);
            }
        }
Пример #3
0
        public void TestErrorBusinessRuleException()
        {
            ElasticLogger.Configure(ELASTIC_URL, ELASTIC_INDEX, APPLICATION_ID);

            try
            {
                throw new Exception("TESTE");
            }
            catch (Exception e)
            {
                ElasticLogger.ErrorBusinessRuleException(new LogModel()
                {
                    registro_mensagem    = "TESTE",
                    registro_codigo_erro = (int)ErroEnum.Servico.Indisponivel
                }, e);
            }
        }