Removing Logging related interfaces from sample
Now that we have a NullLogger as a part of Hosting. So we don't need to add this service in the sample.
This commit is contained in:
parent
f9693488ca
commit
9ecdeda83e
|
|
@ -1,37 +1,36 @@
|
|||
{
|
||||
"version": "0.1-alpha-*",
|
||||
"dependencies": {
|
||||
"Helios": "0.1-alpha-379",
|
||||
"Microsoft.AspNet.Abstractions": "0.1-alpha-320",
|
||||
"Microsoft.AspNet.Mvc": "0.1-alpha-811",
|
||||
"Microsoft.AspNet.Razor": "0.1-alpha-182",
|
||||
"Microsoft.Framework.ConfigurationModel": "0.1-alpha-190",
|
||||
"Microsoft.AspNet.DependencyInjection": "0.1-alpha-291",
|
||||
"Microsoft.AspNet.RequestContainer": "0.1-alpha-361",
|
||||
"Microsoft.AspNet.Routing": "0.1-alpha-350",
|
||||
"Microsoft.AspNet.Mvc.ModelBinding": "0.1-alpha-811",
|
||||
"Microsoft.AspNet.Mvc.Core": "0.1-alpha-811",
|
||||
"Microsoft.AspNet.Mvc.Razor": "0.1-alpha-811",
|
||||
"Microsoft.AspNet.StaticFiles": "0.1-alpha-273",
|
||||
"System.Security.Claims": "0.1-alpha-183",
|
||||
"Helios": "0.1-alpha-build-0489",
|
||||
"Microsoft.AspNet.Http": "0.1-alpha-381",
|
||||
"Microsoft.AspNet.Mvc": "0.1-alpha-build-1047",
|
||||
"Microsoft.AspNet.Razor": "0.1-alpha-187",
|
||||
"Microsoft.Framework.ConfigurationModel": "0.1-alpha-214",
|
||||
"Microsoft.Framework.DependencyInjection": "0.1-alpha-build-0345",
|
||||
"Microsoft.AspNet.RequestContainer": "0.1-alpha-build-0477",
|
||||
"Microsoft.AspNet.Routing": "0.1-alpha-build-0478",
|
||||
"Microsoft.AspNet.Mvc.ModelBinding": "0.1-alpha-build-1047",
|
||||
"Microsoft.AspNet.Mvc.Core": "0.1-alpha-build-1047",
|
||||
"Microsoft.AspNet.Mvc.Razor": "0.1-alpha-build-1047",
|
||||
"Microsoft.AspNet.StaticFiles": "0.1-alpha-build-0367",
|
||||
"System.Security.Claims": "0.1-alpha-build-0230",
|
||||
"System.Security.Principal": "4.0.0.0",
|
||||
"Microsoft.AspNet.Security.DataProtection": "0.1-alpha-144",
|
||||
"Microsoft.AspNet.Identity": "0.1-alpha-518",
|
||||
"Microsoft.AspNet.Identity.Entity": "0.1-alpha-518",
|
||||
"Microsoft.AspNet.Identity.InMemory": "0.1-alpha-518",
|
||||
"Microsoft.AspNet.Identity.Security": "0.1-alpha-518",
|
||||
"Microsoft.Data.Entity": "0.1-alpha-530",
|
||||
"Microsoft.Data.Relational": "0.1-alpha-530",
|
||||
"Microsoft.Data.SqlServer": "0.1-alpha-530",
|
||||
"Microsoft.Data.InMemory": "0.1-alpha-530",
|
||||
"Microsoft.Data.Migrations": "0.1-alpha-530",
|
||||
"Microsoft.AspNet.Diagnostics": "0.1-alpha-272",
|
||||
"Microsoft.AspNet.Hosting": "0.1-alpha-361",
|
||||
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-308",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "0.1-alpha-190",
|
||||
"Microsoft.AspNet.Security": "0.1-alpha-246",
|
||||
"Microsoft.AspNet.Security.Cookies": "0.1-alpha-246",
|
||||
"Microsoft.AspNet.Logging": "0.1-alpha-160"
|
||||
"Microsoft.AspNet.Security.DataProtection": "0.1-alpha-148",
|
||||
"Microsoft.AspNet.Identity": "0.1-alpha-build-0805",
|
||||
"Microsoft.AspNet.Identity.Entity": "0.1-alpha-build-0805",
|
||||
"Microsoft.AspNet.Identity.InMemory": "0.1-alpha-build-0805",
|
||||
"Microsoft.AspNet.Identity.Security": "0.1-alpha-build-0805",
|
||||
"Microsoft.Data.Entity": "0.1-alpha-build-0686",
|
||||
"Microsoft.Data.Entity.Relational": "0.1-alpha-build-0686",
|
||||
"Microsoft.Data.Entity.SqlServer": "0.1-alpha-build-0686",
|
||||
"Microsoft.Data.Entity.InMemory": "0.1-alpha-build-0686",
|
||||
"Microsoft.Data.Entity.Migrations": "0.1-alpha-build-0686",
|
||||
"Microsoft.AspNet.Diagnostics": "0.1-alpha-build-0522",
|
||||
"Microsoft.AspNet.Hosting": "0.1-alpha-build-0477",
|
||||
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-build-0423",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "0.1-alpha-214",
|
||||
"Microsoft.AspNet.Security": "0.1-alpha-build-0401",
|
||||
"Microsoft.AspNet.Security.Cookies": "0.1-alpha-build-0401"
|
||||
},
|
||||
"configurations": {
|
||||
"net45": {
|
||||
|
|
@ -53,7 +52,7 @@
|
|||
"System.Console": "4.0.0.0",
|
||||
"System.Diagnostics.Debug": "4.0.10.0",
|
||||
"System.Diagnostics.Tools": "4.0.0.0",
|
||||
"Microsoft.ComponentModel.DataAnnotations": "4.0.10.0",
|
||||
"Microsoft.DataAnnotations": "0.1-alpha-build-0097",
|
||||
"System.Reflection": "4.0.10.0",
|
||||
"System.Reflection.Extensions": "4.0.0.0",
|
||||
"System.IO": "4.0.0.0"
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
using Microsoft.Framework.Logging;
|
||||
using System;
|
||||
|
||||
namespace MusicStore.Logging
|
||||
{
|
||||
public class NullLogger : ILogger
|
||||
{
|
||||
public bool WriteCore(TraceType eventType, int eventId, object state, Exception exception, Func<object, Exception, string> formatter)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace MusicStore.Logging
|
||||
{
|
||||
public class NullLoggerFactory : ILoggerFactory
|
||||
{
|
||||
public ILogger Create(string name)
|
||||
{
|
||||
return new NullLogger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,6 @@ using Microsoft.Data.Entity;
|
|||
using Microsoft.Data.Entity.InMemory;
|
||||
using Microsoft.Data.Entity.SqlServer;
|
||||
using Microsoft.Net.Runtime;
|
||||
using MusicStore.Logging;
|
||||
using MusicStore.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -42,9 +41,6 @@ public class Startup
|
|||
configuration.AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
|
||||
services.AddInstance<IConfiguration>(configuration);
|
||||
|
||||
//Bug: https://github.com/aspnet/Hosting/issues/20
|
||||
services.AddInstance<ILoggerFactory>(new NullLoggerFactory());
|
||||
|
||||
//Add all MVC related services to IoC.
|
||||
services.AddMvc();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue