reckfellENGINE

Logger

Custom logger to receive messages from the internal error/warning stream.

On this page
class LoggerReckfellSharpInherits RefCounted

Custom logger to receive messages from the internal error/warning stream.

Custom logger to receive messages from the internal error/warning stream. Loggers are registered via OS.AddLogger.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

LoggerConstructor
# Logger
C#
public Logger();

Methods2

_LogErrorvoid
# _LogError
C#
public virtual void _LogError(string function, string file, int line, string code, string rationale, bool editorNotify, int errorType, Reckfell.Collections.Array<ScriptBacktrace> scriptBacktraces);

Called when an error is logged. The error provides the function, file, and line that it originated from, as well as either the code that generated the error or a rationale. The type of error provided by error_type is described in the Logger.ErrorType enumeration. Additionally, script_backtraces provides backtraces for each of the script languages. These will only contain stack frames in editor builds and debug builds by default. To enable them for release builds as well, you need to enable ProjectSettings.debug/settings/csharp/always_track_call_stacks. Warning: This method will be called from threads other than the main thread, possibly at the same time, so you will need to have some kind of thread-safety in your implementation of it, like a Mutex. Note: script_backtraces will not contain any captured variables, due to its prohibitively high cost. To get those, you will need to capture the backtraces yourself, from within the Logger virtual methods, using Engine.CaptureScriptBacktraces. Note: Logging errors from this method using functions like ReckfellApi.PushError or ReckfellApi.PushWarning is not supported, as it could cause infinite recursion. These errors will only show up in the console output.

Parameters
NameTypeDefault
functionstring—
filestring—
lineint—
codestring—
rationalestring—
editorNotifybool—
errorTypeint—
scriptBacktracesReckfell.Collections.Array<ScriptBacktrace>—
_LogMessagevoid
# _LogMessage
C#
public virtual void _LogMessage(string message, bool error);

Called when a message is logged. If error is true, then this message was meant to be sent to stderr. Warning: This method will be called from threads other than the main thread, possibly at the same time, so you will need to have some kind of thread-safety in your implementation of it, like a Mutex. Note: Logging another message from this method using functions like ReckfellApi.Print is not supported, as it could cause infinite recursion. These messages will only show up in the console output.

Parameters
NameTypeDefault
messagestring—
errorbool—

Logger.ErrorType

ValueDescription
Error = 0

The message received is an error.

Script = 2

The message received is a script error.

Shader = 3

The message received is a shader error.

Warning = 1

The message received is a warning.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.