使用 Exceptionless API

# 这里使用了 AgileConfig var appId = "appConfig_demo"; var secret = "xxx"; var nodes = "https://xxx.xxx.com:7005/"; var configClient = new AgileConfig.Client.ConfigClient(appId, secret, nodes, "DEV"); await configClient.ConnectAsync(); var apiKey = configClient["exceptionless:key"]; var serverUrl = configClient["exceptionless:server"]; ExceptionlessClient client = new ExceptionlessClient(config => { config.ApiKey = apiKey; config.ServerUrl = serverUrl; }); var error = new ApplicationException("我是测试"); System.Linq.Enumerable.Range(1, 100).AsParallel().ForAll(it => client.SubmitException(new ApplicationException($@"我是测试 II {it}") )); System.Linq.Enumerable.Range(1, 100).AsParallel().ForAll(it => client.SubmitLog($@"我是日志 {it}")); "测试完成".Dump();
上一篇
下一篇