Files
caliverse_server/UGQDataAccess/Logs/UgqApiBusinessLogger.cs
2025-05-01 07:20:41 +09:00

43 lines
1.6 KiB
C#

using ServerCommon;
using UGQDatabase.Models;
using ServerCore; using ServerBase;
namespace UGQDataAccess.Logs;
public static class UgqApiBusinessLogger
{
public static void initBusinessLog()
{
BusinessLogger.setup(new NLogAppender()
, new JsonText()
, LogTransToOutputType.TransToMultyLine);
Log.getLogger().info($"Success ServerLogicBase.onInitBusinessLog()");
}
public static ServerErrorCode collectLogs(LogAction logAction, AccountEntity accountEntity, List<ILogInvoker> invokers)
{
UgqLogAccount ugqLogAccount = new UgqLogAccount(accountEntity);
return BusinessLogger.collectLogs(logAction, ugqLogAccount, invokers);
}
public static ServerErrorCode collectLogs(LogAction logAction, string userGuid, List<ILogInvoker> invokers)
{
UgqLogAccount ugqLogAccount = new UgqLogAccount(userGuid);
return BusinessLogger.collectLogs(logAction, ugqLogAccount, invokers);
}
public static ServerErrorCode collectLogs(LogAction logAction, AdminAccountEntity accountEntity, List<ILogInvoker> invokers)
{
UgqLogAdmin ugqLogAdmin = new UgqLogAdmin(accountEntity);
return BusinessLogger.collectLogs(logAction, ugqLogAdmin, invokers);
}
public static ServerErrorCode collectLogs(LogAction logAction, string userGuid, string nickname, List<ILogInvoker> invokers)
{
UgqLogAccount ugqLogAccount = new UgqLogAccount(userGuid, nickname);
return BusinessLogger.collectLogs(logAction, ugqLogAccount, invokers);
}
}