// Licensed under the MIT License (the "License").// You may not use this file except in compliance with the License.// You may obtain a copy of the License at// https://github.com/SpringHgui/OpenTask/blob/master/LICENSE// Copyright (c) 2024 Gui.Husing Microsoft.Extensions.Hosting;using OpenTask.Client.Handlers;using OpenTask.Core.Extensions;using Serilog;namespace OpenTask.Client{internal class Program{private const string outputTemplate = "[{Timestamp:HH:mm:ss.fff} {TraceId} {Level:u3}] {Message:lj}{NewLine}{Exception}";public static void Main(string[] args){IHost host = Host.CreateDefaultBuilder(args).ConfigureServices((ctx, services) =>{_ = services.AddOpenTaskWorker(ctx.Configuration.GetSection("OpenTaskWorker"), options =>{options.AddHandler<DemoJobHandler>();options.AddHandler<JobHandler>();});}).UseSerilog((context, configuration) =>{_ = configuration.WriteTo.Console(Serilog.Events.LogEventLevel.Debug, outputTemplate: outputTemplate);}).Build();host.Run();}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型