| | |
| | | namespace WIDESEAWCS_Core.AOP |
| | | { |
| | | /// <summary> |
| | | /// 拦截器BlogLogAOP 继承IInterceptor接口 |
| | | /// 拦截器LogAOP 继承IInterceptor接口 |
| | | /// </summary> |
| | | public class LogAOP : IInterceptor |
| | | { |
| | |
| | | apiLogAopInfo.ResponseJsonData = jsonResult; |
| | | Parallel.For(0, 1, e => |
| | | { |
| | | LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); |
| | | LogLock.OutLogAOP("全局日志AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) // 同步2 |
| | | { |
| | | LogEx(ex, apiLogAopInfo); |
| | | throw; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | Parallel.For(0, 1, e => |
| | | { |
| | | LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); |
| | | LogLock.OutLogAOP("全局日志AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | // 异常日志里有详细的堆栈信息 |
| | | Parallel.For(0, 1, e => |
| | | { |
| | | LogLock.OutLogAOP("AOPLogEx", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) }); |
| | | LogLock.OutLogAOP("全局异常错误日志AOP", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) }); |
| | | }); |
| | | } |
| | | } |