public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { app.UseAuthentication(); loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); var logger = loggerFactory.CreateLogger("DotNet.Core2.Web.Skeleton "); MyLogger.Logger = logger; MyLogger.LogInformation($"- Application started "); string strGName = ""; if (GCSettings.IsServerGC == true) { strGName = "server"; } else { strGName = "workstation"; } MyLogger.LogInformation($"The {strGName} garbage collector is running."); app.UseResponseCompression(); app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public async Task ReceiveShowHUDTextMessage(ShowHUDTextMessage message) { MessageQueue.ReceiveMessagesQueue.Enqueue(message); MyLogger?.LogInformation($"Received {message.GetType().Name}"); await Task.CompletedTask; }