剑轩

net core配置错误日志

电脑版发表于:2019/3/16 12:08


发布net core项目的时候经常会遇到错误,在页面上也不好直接看到。

可能就提示一句话:An error occurred while starting the application

这个时候我们可以配置一下错误日志,然后在错误日志里边去看具体的错误


在webconfig中找到stdoutLogEnabled

  <aspNetCore processPath="dotnet" arguments=".\TNBLOG_PHone.dll" stdoutLogEnabled="false"
   stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />

默认是false,把false修改为true


然后在项目中的logs下面就可以看到错误日志的txt文件了

然后就可以看到具体的错误信息从而解决问题了




关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢