コード例 #1
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            var loggingSettings = new LoggingSettings();

            Configuration.GetSection("ApplicationInsights").Bind(loggingSettings);

            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();
            loggerFactory.AddApplicationInsightsLogger(loggingSettings);
            app.UseMvc();
        }