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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user