Refactor the ASP Logger to take advantage of new .net6 features
This commit is contained in:
parent
e01a066920
commit
47299dd1de
2 changed files with 77 additions and 82 deletions
|
@ -1,9 +1,8 @@
|
|||
using System.Collections.Concurrent;
|
||||
using Geekbot.Core.Logger;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Geekbot.Web.Logging
|
||||
{
|
||||
namespace Geekbot.Web.Logging;
|
||||
|
||||
public class AspLogProvider : ILoggerProvider
|
||||
{
|
||||
private readonly IGeekbotLogger _geekbotLogger;
|
||||
|
@ -25,4 +24,3 @@ namespace Geekbot.Web.Logging
|
|||
return _loggers.GetOrAdd(categoryName, name => new AspLogger(categoryName, _geekbotLogger));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,7 @@
|
|||
using System;
|
||||
using Geekbot.Core.Logger;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Geekbot.Core.Logger;
|
||||
|
||||
namespace Geekbot.Web.Logging;
|
||||
|
||||
namespace Geekbot.Web.Logging
|
||||
{
|
||||
public class AspLogger : ILogger
|
||||
{
|
||||
private readonly string _categoryName;
|
||||
|
@ -68,4 +66,3 @@ namespace Geekbot.Web.Logging
|
|||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue