zoukankan      html  css  js  c++  java
  • Use of exceptionless, 作全局日志分布式记录处理

    Download latest release of exceptionless on github and deploy on Window server, by default exceptionless has elasticsearch packages along with its installation folder, remember to read readme file first when executing powershell, i.e. to set powershell execution policy to unrestricted, then configure elasticseach address in both ui and configfile. Also just set up a website using the webroot folder on iis is OK, launch the website.
    Then register an account.
    Login and create an application as well as organization, choose API type .net core and find in API key the key for this orgnanization.
    The UI is like

    On client side,
    in appsettings.json

     "Exceptionless": {
        "ApiKey": "xxxxx",
        "ServerUrl": "http://localhost:50000",
        "DefaultData": {
          "JSON_OBJECT": "{ "Name": "myname" }",
          "Boolean": true,
          "Number": 1,
          "Array": "1,2,3"
        },
        "DefaultTags": [ "xplat" ],
        "Settings": {
          "FeatureXYZEnabled": false
        }
      }
    

    In Startup.cs

            public void Configure(IApplicationBuilder app, IHostingEnvironment env)
            {
                app.UseExceptionless(Configuration);
            }
    

    In code, to submit an exception to exceptionless

    new Exception("hello, exceptionless").ToExceptionless().Submit()
    

    In this way, exceptionless is integrated, and on UI, it does not capture unhandled exceptions whenever an exception is thrown!!! This has been tested, only for exceptions submitted will appear in the UI.

  • 相关阅读:
    JS身份证真实性校验(一)
    Python之文件操作
    python之数据类型
    Python之循环条件、变量、字符串格式化
    webpack之proxyTable设置跨域
    vue报错解决方案
    CentOS 7 下Ansiable搭建命令列表 及常用监控指令
    CentOS 7 下nagios搭建记录
    弹窗鼠标拖动功能-js
    做好探索性测试,体现你的价值
  • 原文地址:https://www.cnblogs.com/hualiu0/p/10383446.html
Copyright © 2011-2022 走看看