如何在ABP中获取更详细的异常? [英] How to get more detailed exception in ABP?

查看:331
本文介绍了如何在ABP中获取更详细的异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个CrudAppService.当我使用 swagger 调用其动态API时,出现以下通用500错误,描述如下:

I created a CrudAppService. When I invoke its dynamic API by using swagger, I get a generic 500 error with this description:

{
  "result": null,
  "targetUrl": null,
  "success": false,
  "error": {
    "code": 0,
    "message": "An internal error occurred during your request!",
    "details": null,
    "validationErrors": null
  },
  "unAuthorizedRequest": false,
  "__abp": true
}

如何获取更详细的异常进行调试?我有什么需要启用的吗?

How can I get a more detailed exception to debug? Is there something I have to enable?

推荐答案

检查 Logs.txt 中的错误.

摘自记录上的文档:

From the documentation on Logging:

配置

从ASP.NET Boilerplate模板创建应用程序时,Log4Net的所有配置均已完成.

Configuration

All configuration is done for Log4Net when you create your application from ASP.NET Boilerplate templates.

...

它是在应用程序的 log4net.config 文件中定义的,如下所示:

It's defined in the log4net.config file of the application as shown below:

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" >
    <file value="Logs/Logs.txt" />

这篇关于如何在ABP中获取更详细的异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆