diff --git a/samples/CookieSample/Startup.cs b/samples/CookieSample/Startup.cs index 71386c068e..cd8bf76211 100644 --- a/samples/CookieSample/Startup.cs +++ b/samples/CookieSample/Startup.cs @@ -7,7 +7,6 @@ using Microsoft.AspNet.RequestContainer; using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; -using Microsoft.Framework.Logging; namespace CookieSample { @@ -15,12 +14,6 @@ namespace CookieSample { public void Configuration(IBuilder app) { - app.UseServices(services => - { - // TODO: Move to host. - services.AddInstance(new NullLoggerFactory()); - }); - app.UseCookieAuthentication(new CookieAuthenticationOptions() { @@ -41,23 +34,5 @@ namespace CookieSample await context.Response.WriteAsync("Hello old timer"); }); } - - // TODO: Temp workaround until the host reliably provides logging. - // If ILoggerFactory is never guaranteed, move this fallback into Microsoft.Framework.Logging. - private class NullLoggerFactory : ILoggerFactory - { - public ILogger Create(string name) - { - return new NullLongger(); - } - } - - private class NullLongger : ILogger - { - public bool WriteCore(TraceType eventType, int eventId, object state, Exception exception, Func formatter) - { - return false; - } - } } } \ No newline at end of file diff --git a/samples/CookieSample/project.json b/samples/CookieSample/project.json index 22f33b30b0..81321a825b 100644 --- a/samples/CookieSample/project.json +++ b/samples/CookieSample/project.json @@ -10,8 +10,7 @@ "Microsoft.AspNet.FeatureModel": "0.1-alpha-*", "Microsoft.AspNet.HttpFeature": "0.1-alpha-*", "Microsoft.AspNet.Server.WebListener": "0.1-alpha-*", - "Microsoft.Framework.DependencyInjection": "0.1-alpha-*", - "Microsoft.Framework.Logging": "0.1-alpha-*" + "Microsoft.Framework.DependencyInjection": "0.1-alpha-*" }, "commands": { "web": "Microsoft.AspNet.Hosting server.name=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:12345" }, "configurations": {