Class SelfLog
Static class for Self-Logging mechanism in Unity Logging. Use this to debug Sinks / Logging.
Namespace: Unity.Logging.Internal.Debug
Syntax
public static class SelfLog : object
Properties
IsEnabled
True if SelfLog.Mode is not Disabled
Declaration
public static bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Error(FixedString512Bytes)
Write error to SelfLog
Declaration
public static void Error(FixedString512Bytes errorMessage)
Parameters
Type | Name | Description |
---|---|---|
FixedString512Bytes | errorMessage | Error message |
OnFailedToAllocateMemory(FixedString4096Bytes)
On Failure in LogMemoryManager
Declaration
public static void OnFailedToAllocateMemory(FixedString4096Bytes stateReport)
Parameters
Type | Name | Description |
---|---|---|
FixedString4096Bytes | stateReport | Debug report from DebugStateString(FixedString128Bytes) |
OnFailedToAllocatePayloadBecauseOfItsSize(UInt32)
On Failure if requested size is outside [MinimumPayloadSize, MaximumPayloadSize]
Declaration
public static void OnFailedToAllocatePayloadBecauseOfItsSize(uint requestedSize)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | requestedSize | size that is not correct |
OnFailedToCreateDisjointedBuffer()
On Failure connected to disjointed buffer allocation
Declaration
public static void OnFailedToCreateDisjointedBuffer()
OnFailedToParseMessage()
On Failure in LogMessage parsing
Declaration
public static void OnFailedToParseMessage()
OnSinkFatalError<T>(SinkSystemBase<T>, FixedString512Bytes)
On Fatal Error in the Sink
Declaration
public static void OnSinkFatalError<T>(SinkSystemBase<T> sinkSystem, FixedString512Bytes reason)
where T : struct, ILogger
Parameters
Type | Name | Description |
---|---|---|
SinkSystemBase<T> | sinkSystem | Sink that caused the error |
FixedString512Bytes | reason | Description of the error |
Type Parameters
Name | Description |
---|---|
T | ILogger type |
SetMode(SelfLog.Mode)
Sets current SelfLog SelfLog.Mode
Declaration
public static void SetMode(SelfLog.Mode modeToSet)
Parameters
Type | Name | Description |
---|---|---|
SelfLog.Mode | modeToSet | New mode to set |