log db queries
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
@@ -26,6 +27,8 @@ namespace ReallifeGamemode.Server.Core
|
||||
API = api;
|
||||
EventHandler = eventHandler;
|
||||
|
||||
DatabaseContext.LoggerFactory = LogManager.Factory;
|
||||
|
||||
API.DisableDefaultCommandErrorMessages();
|
||||
API.DisableDefaultSpawnBehavior();
|
||||
API.SetGlobalChatEnabled(false);
|
||||
@@ -61,9 +64,9 @@ namespace ReallifeGamemode.Server.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static DatabaseContext GetDbContext(bool useLoggerFactory = true)
|
||||
public static DatabaseContext GetDbContext(bool useLoggerFactory = false)
|
||||
{
|
||||
return new DatabaseContext(useLoggerFactory ? LogManager.Factory : null);
|
||||
return new DatabaseContext(useLoggerFactory);
|
||||
}
|
||||
|
||||
internal static TScript GetScript<TScript>() where TScript : Script
|
||||
|
||||
Reference in New Issue
Block a user