using System.Diagnostics; namespace UnityEditor.Build.Pipeline.Utilities { using Debug = UnityEngine.Debug; /// /// Logging overrides for SBP build logs. /// public static class BuildLogger { /// /// Logs build cache information. /// /// The message to display. /// The objects formatted in the message. [Conditional("BUILD_CACHE_DEBUG")] public static void LogCache(string msg, params object[] attrs) { Log(msg, attrs); } /// /// Logs a warning about the build cache. /// /// The message to display. /// The objects formatted in the message. [Conditional("BUILD_CACHE_DEBUG")] public static void LogCacheWarning(string msg, params object[] attrs) { LogWarning(msg, attrs); } /// /// Logs general information. /// /// The message to display. [Conditional("DEBUG")] public static void Log(string msg) { Debug.Log(msg); } /// /// Logs general information. /// /// The message object to display. [Conditional("DEBUG")] public static void Log(object msg) { Debug.Log(msg); } /// /// Logs general information. /// /// The message to display. /// The objects formatted in the message. [Conditional("DEBUG")] public static void Log(string msg, params object[] attrs) { Debug.Log(string.Format(msg, attrs)); } /// /// Logs a general warning. /// /// The message to display. [Conditional("DEBUG")] public static void LogWarning(string msg) { Debug.LogWarning(msg); } /// /// Logs a general warning. /// /// The message object to display. [Conditional("DEBUG")] public static void LogWarning(object msg) { Debug.LogWarning(msg); } /// /// Logs a general warning. /// /// The message object to display. /// The objects formatted in the message. [Conditional("DEBUG")] public static void LogWarning(string msg, params object[] attrs) { Debug.LogWarning(string.Format(msg, attrs)); } /// /// Logs a general error. /// /// The message to display. [Conditional("DEBUG")] public static void LogError(string msg) { Debug.LogError(msg); } /// /// Logs a general error. /// /// The message object to display. [Conditional("DEBUG")] public static void LogError(object msg) { Debug.LogError(msg); } /// /// Logs a general error. /// /// The message to display. /// The objects formatted in the message. [Conditional("DEBUG")] public static void LogError(string msg, params object[] attrs) { Debug.LogError(string.Format(msg, attrs)); } /// /// Logs a general exception. /// /// The exception to display. [Conditional("DEBUG")] public static void LogException(System.Exception e) { Debug.LogException(e); } } }