升级框架版本
This commit is contained in:
121
Assets/Scripts/NBC.Fantasy/Runtime/Core/Log/Log.cs
Normal file
121
Assets/Scripts/NBC.Fantasy/Runtime/Core/Log/Log.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
public static class Log
|
||||
{
|
||||
/// <summary>
|
||||
/// 记录跟踪级别的日志消息。
|
||||
/// </summary>
|
||||
/// <param name="msg">日志消息。</param>
|
||||
public static void Trace(string msg)
|
||||
{
|
||||
Fantasy.Log.Trace(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录调试级别的日志消息。
|
||||
/// </summary>
|
||||
/// <param name="msg">日志消息。</param>
|
||||
public static void Debug(string msg)
|
||||
{
|
||||
Fantasy.Log.Debug(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录信息级别的日志消息。
|
||||
/// </summary>
|
||||
/// <param name="msg">日志消息。</param>
|
||||
public static void Info(string msg)
|
||||
{
|
||||
Fantasy.Log.Info(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录跟踪级别的日志消息,并附带调用栈信息。
|
||||
/// </summary>
|
||||
/// <param name="msg">日志消息。</param>
|
||||
public static void TraceInfo(string msg)
|
||||
{
|
||||
Fantasy.Log.TraceInfo(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录警告级别的日志消息。
|
||||
/// </summary>
|
||||
/// <param name="msg">日志消息。</param>
|
||||
public static void Warning(string msg)
|
||||
{
|
||||
Fantasy.Log.Warning(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录错误级别的日志消息,并附带调用栈信息。
|
||||
/// </summary>
|
||||
/// <param name="msg">日志消息。</param>
|
||||
public static void Error(string msg)
|
||||
{
|
||||
Fantasy.Log.Error(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录异常的错误级别的日志消息,并附带调用栈信息。
|
||||
/// </summary>
|
||||
/// <param name="e">异常对象。</param>
|
||||
public static void Error(Exception e)
|
||||
{
|
||||
Fantasy.Log.Error(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录跟踪级别的格式化日志消息,并附带调用栈信息。
|
||||
/// </summary>
|
||||
/// <param name="message">日志消息模板。</param>
|
||||
/// <param name="args">格式化参数。</param>
|
||||
public static void Trace(string message, params object[] args)
|
||||
{
|
||||
Fantasy.Log.Trace(message, args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录警告级别的格式化日志消息。
|
||||
/// </summary>
|
||||
/// <param name="message">日志消息模板。</param>
|
||||
/// <param name="args">格式化参数。</param>
|
||||
public static void Warning(string message, params object[] args)
|
||||
{
|
||||
Fantasy.Log.Warning(message, args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录信息级别的格式化日志消息。
|
||||
/// </summary>
|
||||
/// <param name="message">日志消息模板。</param>
|
||||
/// <param name="args">格式化参数。</param>
|
||||
public static void Info(string message, params object[] args)
|
||||
{
|
||||
Fantasy.Log.Info(message, args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录调试级别的格式化日志消息。
|
||||
/// </summary>
|
||||
/// <param name="message">日志消息模板。</param>
|
||||
/// <param name="args">格式化参数。</param>
|
||||
public static void Debug(string message, params object[] args)
|
||||
{
|
||||
Fantasy.Log.Debug(message, args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录错误级别的格式化日志消息,并附带调用栈信息。
|
||||
/// </summary>
|
||||
/// <param name="message">日志消息模板。</param>
|
||||
/// <param name="args">格式化参数。</param>
|
||||
public static void Error(string message, params object[] args)
|
||||
{
|
||||
Fantasy.Log.Error(message, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/NBC.Fantasy/Runtime/Core/Log/Log.cs.meta
Normal file
3
Assets/Scripts/NBC.Fantasy/Runtime/Core/Log/Log.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9649baebc8f4002b5e0778a454b5573
|
||||
timeCreated: 1762935556
|
||||
Reference in New Issue
Block a user