修改BUG:ErrorPage为空时禁止DbLogger

This commit is contained in:
Argo-MacBookPro 2018-08-04 19:41:09 +08:00
parent 9adb45a6b6
commit f1dfc3c091
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ namespace Bootstrap.DataAccess
/// <returns></returns>
public static void Log(Exception ex, NameValueCollection additionalInfo)
{
if (additionalInfo["ErrorPage"] == null) return;
var sql = "insert into Exceptions (AppDomainName, ErrorPage, UserID, UserIp, ExceptionType, Message, StackTrace, LogTime) values (@AppDomainName, @ErrorPage, @UserID, @UserIp, @ExceptionType, @Message, @StackTrace, GetDate())";
using (DbCommand cmd = DBAccessManager.SqlDBAccess.CreateCommand(CommandType.Text, sql))
{