Created
September 2, 2021 12:23
-
-
Save alexandrebl/35d87ffd84e7bed6b4639b0335230c28 to your computer and use it in GitHub Desktop.
Microsoft Logger Console Load Service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading.Tasks; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.Extensions.Logging; | |
| class Program | |
| { | |
| static Task Main(string[] args) | |
| { | |
| IHost host = Host.CreateDefaultBuilder(args).Build(); | |
| var logger = host.Services.GetRequiredService<ILogger<Program>>(); | |
| logger.LogInformation("Host created."); | |
| return host.RunAsync(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment