添加serilog日志支持和部分其他efcore代码

This commit is contained in:
2021-02-23 16:16:03 +08:00
parent 0f98c15cd4
commit d639db3574
19 changed files with 506 additions and 28 deletions

View File

@@ -6,14 +6,22 @@ using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
namespace QRCodeService.Controllers
{
[Route("[controller]/[action]")]
public class PlaygroundController:ControllerBase
{
private readonly ILogger<PlaygroundController> logger;
public PlaygroundController(ILogger<PlaygroundController> logger)
{
this.logger = logger;
}
public IActionResult GenShortCode(string url)
{
logger.LogInformation("duduledule");
var codes = new string[2];
using (var md5 = MD5.Create())
{