mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
SimpleWebTransport - Added UNITY_SERVER around Exception logging
- don't need color tags on server
This commit is contained in:
parent
33f1f95b8b
commit
6ae165e308
@ -80,7 +80,11 @@ public static void InfoException(Exception e)
|
||||
if (level < Levels.info)
|
||||
return;
|
||||
|
||||
#if UNITY_SERVER
|
||||
logger.Log(LogType.Log, $"[SimpleWebTransport] INFO_EXCEPTION: {e.GetType().Name} Message: {e.Message}\n{e.StackTrace}\n\n");
|
||||
#else
|
||||
logger.Log(LogType.Log, $"[SimpleWebTransport] INFO_EXCEPTION: <color=cyan>{e.GetType().Name}</color> Message: {e.Message}\n{e.StackTrace}\n\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Conditional(SIMPLEWEB_LOG_ENABLED), Conditional(DEBUG)]
|
||||
@ -110,7 +114,11 @@ public static void Error(string msg, bool showColor = true)
|
||||
public static void Exception(Exception e)
|
||||
{
|
||||
// always log Exceptions
|
||||
#if UNITY_SERVER
|
||||
logger.Log(LogType.Error, $"[SimpleWebTransport] EXCEPTION: {e.GetType().Name} Message: {e.Message}\n{e.StackTrace}\n\n");
|
||||
#else
|
||||
logger.Log(LogType.Error, $"[SimpleWebTransport] EXCEPTION: <color=red>{e.GetType().Name}</color> Message: {e.Message}\n{e.StackTrace}\n\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user