摘要: 1、建立一个接口 public interface IServicesDoParse { void Do(); } 2、做一个接口的实现 public class ServicesDoParse : IServicesDoParse { private readonly ILogger<IServi 阅读全文
posted @ 2021-07-29 16:29 星星c# 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1、在appsetting里添加节点 { "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "MQ 阅读全文
posted @ 2021-07-29 16:17 星星c# 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 1、新建项目 选择“Worker Service”,如下图: 2、添加nuget引用 Microsoft.Extensions.Hosting.WindowsServices Serilog.Extensions.Hosting Serilog.Sinks.Console Serilog.Sinks 阅读全文
posted @ 2021-07-29 16:10 星星c# 阅读(416) 评论(0) 推荐(0) 编辑