초기커밋
This commit is contained in:
42
UGQDataAccess/Logs/UgqApiBusinessLogger.cs
Normal file
42
UGQDataAccess/Logs/UgqApiBusinessLogger.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user