Horje
serilog asp.net 5 Code Example
serilog asp.net 5
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public class Program
{
    public static void Main(string[] args)
    {
        Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Information()
            .WriteTo.Debug()
            .CreateLogger();
 
        try
        {
            Log.Information("Starting Web Host");
            CreateHostBuilder(args).Build().Run();
        }
        catch (Exception ex)
        {
            Log.Fatal(ex, "Host terminated unexpectedly");
        }
        finally
        {
            Log.CloseAndFlush();
        }
    }
 
    public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .UseSerilog()
            .ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.UseStartup<Startup>();
            });
}




Csharp

Related
nuget package TSETMC guide Code Example nuget package TSETMC guide Code Example
decimal operator in Convert.toDouble() C# Code Example decimal operator in Convert.toDouble() C# Code Example
c# label continue in new line Code Example c# label continue in new line Code Example
Lcm of numbers Code Example Lcm of numbers Code Example
visual studio pre build event not working Code Example visual studio pre build event not working Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8