From ceb8ce456f406d4010aa83dd7da3d9e63f0e211a Mon Sep 17 00:00:00 2001
From: lingling <kety1122@163.com>
Date: 星期二, 18 三月 2025 15:21:59 +0800
Subject: [PATCH] add log
---
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index 90d9887..b2bf63f 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -2,6 +2,7 @@
using LifePayment.Domain.Shared;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -20,13 +21,16 @@
{
private readonly ILifePayService _lifePayService;
private readonly IWebClientInfoProvider _webClientInfoProvider;
+ private readonly ILogger<LifePayController> _logger;
public LifePayController(
ILifePayService lifePayService,
IWebClientInfoProvider webClientInfoProvider
+ , ILogger<LifePayController> logger
)
{
_lifePayService = lifePayService;
_webClientInfoProvider = webClientInfoProvider;
+ _logger = logger;
}
#region 鏌ヨ
@@ -107,6 +111,20 @@
}
/// <summary>
+ /// 鑾峰彇鐕冩皵鏀寔鍟嗘埛
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+
+ public async Task<int> AddLogger(LogErrorInput input)
+ {
+ Logger.LogError(input.Error);
+ return Constant.SUCCESS;
+ }
+
+
+ /// <summary>
/// 鑾峰彇鎶樻墸
/// </summary>
/// <returns></returns>
--
Gitblit v1.9.1