initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,137 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace UnityEditor.Build.Pipeline.Utilities
|
||||
{
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
/// <summary>
|
||||
/// Logging overrides for SBP build logs.
|
||||
/// </summary>
|
||||
public static class BuildLogger
|
||||
{
|
||||
/// <summary>
|
||||
/// Logs build cache information.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
/// <param name="attrs">The objects formatted in the message.</param>
|
||||
[Conditional("BUILD_CACHE_DEBUG")]
|
||||
public static void LogCache(string msg, params object[] attrs)
|
||||
{
|
||||
Log(msg, attrs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a warning about the build cache.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
/// <param name="attrs">The objects formatted in the message.</param>
|
||||
[Conditional("BUILD_CACHE_DEBUG")]
|
||||
public static void LogCacheWarning(string msg, params object[] attrs)
|
||||
{
|
||||
LogWarning(msg, attrs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs general information.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void Log(string msg)
|
||||
{
|
||||
Debug.Log(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs general information.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message object to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void Log(object msg)
|
||||
{
|
||||
Debug.Log(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs general information.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
/// <param name="attrs">The objects formatted in the message.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void Log(string msg, params object[] attrs)
|
||||
{
|
||||
Debug.Log(string.Format(msg, attrs));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general warning.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogWarning(string msg)
|
||||
{
|
||||
Debug.LogWarning(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general warning.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message object to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogWarning(object msg)
|
||||
{
|
||||
Debug.LogWarning(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general warning.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message object to display.</param>
|
||||
/// <param name="attrs">The objects formatted in the message.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogWarning(string msg, params object[] attrs)
|
||||
{
|
||||
Debug.LogWarning(string.Format(msg, attrs));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general error.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogError(string msg)
|
||||
{
|
||||
Debug.LogError(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general error.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message object to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogError(object msg)
|
||||
{
|
||||
Debug.LogError(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general error.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to display.</param>
|
||||
/// <param name="attrs">The objects formatted in the message.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogError(string msg, params object[] attrs)
|
||||
{
|
||||
Debug.LogError(string.Format(msg, attrs));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a general exception.
|
||||
/// </summary>
|
||||
/// <param name="e">The exception to display.</param>
|
||||
[Conditional("DEBUG")]
|
||||
public static void LogException(System.Exception e)
|
||||
{
|
||||
Debug.LogException(e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue