Fix JSON DLL, NativeUI as git submodule, Add LogManager, Fix DB Migrations
This commit is contained in:
26
ReallifeGamemode.Server.Log/LogManager.cs
Normal file
26
ReallifeGamemode.Server.Log/LogManager.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace ReallifeGamemode.Server.Log
|
||||
{
|
||||
public class LogManager
|
||||
{
|
||||
public static ILoggerFactory Factory => LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddConsole();
|
||||
builder.AddDebug();
|
||||
builder.AddFilter("RageMP.Server", LogLevel.Debug);
|
||||
builder.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.Information);
|
||||
});
|
||||
|
||||
public static ILogger<T> GetLogger<T>()
|
||||
{
|
||||
return Factory.CreateLogger<T>();
|
||||
}
|
||||
|
||||
public static ILogger GetLogger(Type type)
|
||||
{
|
||||
return Factory.CreateLogger(type.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user