mirror of
https://github.com/anegostudios/vsmodtemplate
synced 2025-07-05 12:54:32 -07:00
Updated RedirectLogs
This commit is contained in:
parent
9c7306352c
commit
ba7975d13e
1 changed files with 13 additions and 13 deletions
|
@ -18,24 +18,24 @@ namespace VSModLauncher
|
|||
|
||||
public override void StartServerSide(ICoreServerAPI api)
|
||||
{
|
||||
api.Server.Logger.AddListener(OnServerLogEntry);
|
||||
api.Server.Logger.EntryAdded += OnServerLogEntry;
|
||||
}
|
||||
|
||||
public override void StartClientSide(ICoreClientAPI api)
|
||||
{
|
||||
api.World.Logger.AddListener(OnClientLogEntry);
|
||||
}
|
||||
|
||||
private void OnClientLogEntry(EnumLogType logType, string message, object[] args)
|
||||
{
|
||||
if (logType == EnumLogType.VerboseDebug) return;
|
||||
System.Diagnostics.Debug.WriteLine("[Client " + logType + "] " + message, args);
|
||||
}
|
||||
|
||||
private void OnServerLogEntry(EnumLogType logType, string message, object[] args)
|
||||
private void OnServerLogEntry(EnumLogType logType, string message, params object[] args)
|
||||
{
|
||||
if (logType == EnumLogType.VerboseDebug) return;
|
||||
System.Diagnostics.Debug.WriteLine("[Server " + logType + "] " + message, args);
|
||||
}
|
||||
|
||||
public override void StartClientSide(ICoreClientAPI api)
|
||||
{
|
||||
api.World.Logger.EntryAdded += OnClientLogEntry;
|
||||
}
|
||||
|
||||
private void OnClientLogEntry(EnumLogType logType, string message, params object[] args)
|
||||
{
|
||||
if (logType == EnumLogType.VerboseDebug) return;
|
||||
System.Diagnostics.Debug.WriteLine("[Client " + logType + "] " + message, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue