Class UnityObjectLoggerExt
Utility class for UnityEngine.Object subclasses (MonoBehaviour, Component, Editor, etc.) that want to use the extended logging capabilities below:
- Option to log ThreadId, class name, object name, game time or other common info to log messages.
- Configure the info PER CLASS. Useful for debugging specific classes.
Inheritance
UnityObjectLoggerExt
Assembly: NoSuchStudio-Common.dll
Syntax
public static class UnityObjectLoggerExt
Fields
loggers
Declaration
public static readonly Dictionary<Type, (Logger, LoggerConfig)> loggers
Field Value
Methods
GetLoggerByType(Type)
Declaration
public static (Logger logger, LoggerConfig loggerConfig) GetLoggerByType(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
GetLoggerByType<T>()
Declaration
public static (Logger logger, LoggerConfig loggerConfig) GetLoggerByType<T>()
Returns
Type Parameters
LogError(Object, String)
Declaration
public static void LogError(this Object unityObj, string msg)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
msg |
|
LogError<T>(String)
Declaration
public static void LogError<T>(string msg)
Parameters
| Type |
Name |
Description |
| String |
msg |
|
Type Parameters
LogError<T>(Object, String)
Declaration
public static void LogError<T>(Object unityObj, string msg)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
msg |
|
Type Parameters
Declaration
public static void LogErrorFormat(this Object unityObj, string format, params object[] args)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
format |
|
| Object[] |
args |
|
Declaration
public static void LogErrorFormat<T>(string format, params object[] args)
Parameters
Type Parameters
Declaration
public static void LogErrorFormat<T>(Object unityObj, string format, params object[] args)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
format |
|
| Object[] |
args |
|
Type Parameters
LogLog(Object, String)
Declaration
public static void LogLog(this Object unityObj, string msg)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
msg |
|
LogLog<T>(String)
Declaration
public static void LogLog<T>(string msg)
Parameters
| Type |
Name |
Description |
| String |
msg |
|
Type Parameters
LogLog<T>(Object, String)
Declaration
public static void LogLog<T>(Object unityObj, string msg)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
msg |
|
Type Parameters
Declaration
public static void LogLogFormat(this Object unityObj, string format, params object[] args)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
format |
|
| Object[] |
args |
|
Declaration
public static void LogLogFormat<T>(string format, params object[] args)
Parameters
Type Parameters
Declaration
public static void LogLogFormat<T>(Object unityObj, string format, params object[] args)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
format |
|
| Object[] |
args |
|
Type Parameters
LogWarn(Object, String)
Declaration
public static void LogWarn(this Object unityObj, string msg)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
msg |
|
LogWarn<T>(String)
Declaration
public static void LogWarn<T>(string msg)
Parameters
| Type |
Name |
Description |
| String |
msg |
|
Type Parameters
LogWarn<T>(Object, String)
Declaration
public static void LogWarn<T>(Object unityObj, string msg)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
msg |
|
Type Parameters
Declaration
public static void LogWarnFormat(this Object unityObj, string format, params object[] args)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
format |
|
| Object[] |
args |
|
Declaration
public static void LogWarnFormat<T>(string format, params object[] args)
Parameters
Type Parameters
Declaration
public static void LogWarnFormat<T>(Object unityObj, string format, params object[] args)
Parameters
| Type |
Name |
Description |
| UnityEngine.Object |
unityObj |
|
| String |
format |
|
| Object[] |
args |
|
Type Parameters