Fix JSON DLL, NativeUI as git submodule, Add LogManager, Fix DB Migrations

This commit is contained in:
hydrant
2020-03-02 21:36:53 +01:00
parent d7a76caf2a
commit 2c978537d9
35 changed files with 280 additions and 107 deletions

View 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);
}
}
}