feat: strengthen P0 security and operations
This commit is contained in:
26
Tiku.Worker/Program.cs
Normal file
26
Tiku.Worker/Program.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
using Tiku.Worker;
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console()
|
||||
.CreateBootstrapLogger();
|
||||
|
||||
try
|
||||
{
|
||||
Log.Information("Starting TIKU Worker");
|
||||
var builder = Host.CreateApplicationBuilder(args);
|
||||
builder.AddWorkerServices();
|
||||
await builder.Build().RunAsync();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Fatal(exception, "TIKU Worker terminated unexpectedly");
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Log.CloseAndFlushAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user