修改BUG:数据库日志在文件日志后此处不用初始化UserId、UserIp

This commit is contained in:
Argo-Lenovo 2016-11-17 22:48:30 +08:00
parent 98fcf66143
commit 636e9b3543
1 changed files with 0 additions and 5 deletions

View File

@ -4,7 +4,6 @@ using Longbow.ExceptionManagement;
using Longbow.ExceptionManagement.Configuration;
using System;
using System.Collections.Specialized;
using System.Web;
namespace Bootstrap.Admin
{
@ -22,10 +21,6 @@ namespace Bootstrap.Admin
public void Publish(Exception ex, NameValueCollection additionalInfo, ExceptionPublisherElement publisherElement)
{
if (publisherElement.Mode == PublisherMode.Off) return;
HttpContext context = HttpContext.Current;
additionalInfo["ErrorPage"] = context.Request.AppRelativeCurrentExecutionFilePath;
if (context.User != null) additionalInfo["UserId"] = context.User.Identity.Name;
additionalInfo["UserIp"] = context.Request.UserHostAddress;
ExceptionHelper.Log(ex, additionalInfo);
CacheManager.Clear();
}