// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; namespace LoggingWebSite { public class Startup { // Set up application services public void ConfigureServices(IServiceCollection services) { services.AddElm(options => { // We want to log for all log levels and loggers options.Filter = (loggerName, logLevel) => true; }); services.AddMvc(); } public void Configure(IApplicationBuilder app) { var configuration = app.GetTestConfiguration(); app.Map("/logs", (appBuilder) => { appBuilder.UseMiddleware(); }); app.UseElmCapture(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action}/{id?}", defaults: new { controller = "Home", action = "Index" }); routes.MapRoute( name: "api", template: "{controller}/{id?}"); }); } } }