51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
|
using UnityEngine;
|
||
|
|
||
|
namespace Common
|
||
|
{
|
||
|
public class LogWrapper
|
||
|
{
|
||
|
private static bool isLogDebug = true;
|
||
|
private static bool isLogWarning = true;
|
||
|
private static bool isLogError = true;
|
||
|
|
||
|
public static void Log(object msg)
|
||
|
{
|
||
|
if (isLogDebug == false) return;
|
||
|
Debug.Log(msg);
|
||
|
}
|
||
|
|
||
|
public static void LogFormat(string format, params object[] args)
|
||
|
{
|
||
|
if (isLogDebug == false) return;
|
||
|
Debug.LogFormat(format, args);
|
||
|
}
|
||
|
|
||
|
public static void LogWarning(object msg)
|
||
|
{
|
||
|
if (isLogWarning == false) return;
|
||
|
Debug.LogWarning(msg);
|
||
|
}
|
||
|
|
||
|
public static void LogWarningFormat(string format, params object[] args)
|
||
|
{
|
||
|
if (isLogWarning == false) return;
|
||
|
Debug.LogWarningFormat(format, args);
|
||
|
}
|
||
|
|
||
|
public static void LogError(object msg)
|
||
|
{
|
||
|
if (isLogError == false) return;
|
||
|
Debug.LogError(msg);
|
||
|
}
|
||
|
|
||
|
public static void LogErrorFormat(string format, params object[] args)
|
||
|
{
|
||
|
if (isLogError == false) return;
|
||
|
Debug.LogErrorFormat(format, args);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|