diff --git a/Assets/Mirror/Transports/SimpleWeb/Common/Log.cs b/Assets/Mirror/Transports/SimpleWeb/Common/Log.cs index 3d4636f7c..ff2f3495f 100644 --- a/Assets/Mirror/Transports/SimpleWeb/Common/Log.cs +++ b/Assets/Mirror/Transports/SimpleWeb/Common/Log.cs @@ -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: {e.GetType().Name} 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: {e.GetType().Name} Message: {e.Message}\n{e.StackTrace}\n\n"); +#endif } } }