Skip to content

ILog interface ​

Namespace Lustral · Assembly Lustral.Api

A log whose messages are tagged with their source. Messages are written to Lustral/Logs/latest.log and, when enabled, to the console window.

csharp
public interface ILog

Remarks ​

Messages may contain Unity rich text tags, which the console window renders and log files omit: <color=red> or <color=#ff8800> (a Unity color name, or #rgb/#rrggbb with optional alpha), <b>, <i>, <u> and <s>, each with a closing tag: log.Info("Health: <color=red>low</color>"). As in Unity, a tag without a closing tag is written as plain text.

Methods ​

Debug(string) ​

csharp
void Debug(string message);

Writes a debug message. Debug messages are written only when the log level is Debug.

Error(string, Exception) ​

csharp
void Error(string message, Exception? exception = null);

Writes an error, including the exception and its stack trace if one is given.

Info(string) ​

csharp
void Info(string message);

Writes an informational message.

Warn(string) ​

csharp
void Warn(string message);

Writes a warning.

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.