2023-03-06 19:07:46 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
2023-02-27 18:11:51 +08:00
|
|
|
|
namespace YooAsset.Editor
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class BuildLogger
|
|
|
|
|
|
{
|
2023-03-06 19:07:46 +08:00
|
|
|
|
private static bool _enableLog = true;
|
|
|
|
|
|
|
|
|
|
|
|
public static void InitLogger(bool enableLog)
|
|
|
|
|
|
{
|
|
|
|
|
|
_enableLog = enableLog;
|
|
|
|
|
|
}
|
2023-02-27 18:11:51 +08:00
|
|
|
|
|
2023-03-06 19:07:46 +08:00
|
|
|
|
public static void Log(string message)
|
2023-02-27 18:11:51 +08:00
|
|
|
|
{
|
2023-03-06 19:07:46 +08:00
|
|
|
|
if (_enableLog)
|
2023-02-27 18:11:51 +08:00
|
|
|
|
{
|
2023-03-06 19:07:46 +08:00
|
|
|
|
Debug.Log(message);
|
2023-02-27 18:11:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-03-06 19:07:46 +08:00
|
|
|
|
public static void Warning(string message)
|
|
|
|
|
|
{
|
|
|
|
|
|
Debug.LogWarning(message);
|
|
|
|
|
|
}
|
|
|
|
|
|
public static void Error(string message)
|
2023-02-27 18:11:51 +08:00
|
|
|
|
{
|
2023-03-06 19:07:46 +08:00
|
|
|
|
Debug.LogError(message);
|
2023-02-27 18:11:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|