Disable KCP console logging when debugLog flag is off (#2488)

* Disable KCP console logging when debugLog flag is off

* Update KcpTransport.cs

* Update KcpTransport.cs

Co-authored-by: Tiago Martines <tiago.martines@wildlifestudios.com>
Co-authored-by: vis2k <info@noobtuts.com>
This commit is contained in:
Tiago Martines 2020-12-09 03:29:38 -03:00 committed by GitHub
parent f08aa57f55
commit 6f8a289384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,10 @@ public class KcpTransport : Transport
void Awake()
{
// logging
if (debugLog) Log.Info = Debug.Log;
if (debugLog)
Log.Info = Debug.Log;
else
Log.Info = _ => {};
Log.Warning = Debug.LogWarning;
Log.Error = Debug.LogError;