摘要:
1、建立一个接口 public interface IServicesDoParse { void Do(); } 2、做一个接口的实现 public class ServicesDoParse : IServicesDoParse { private readonly ILogger<IServi 阅读全文
摘要:
1、在appsetting里添加节点 { "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "MQ 阅读全文
摘要:
1、新建项目 选择“Worker Service”,如下图: 2、添加nuget引用 Microsoft.Extensions.Hosting.WindowsServices Serilog.Extensions.Hosting Serilog.Sinks.Console Serilog.Sinks 阅读全文