Log

Log, Log.Message, and Log.Level

Log Class

The Log class handles script logging and error reporting

Syntax

Member Details

Clear Method

Clears all messages in this console.

Syntax

public void Clear ()

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Clear Method

Clears all messages in this console with the given logLevel.

Syntax

Parameters

logLevel

The LogLevel to clear from the log. Multiple loglevels can be cleared in a single cal.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Clear Method

Clears all messages in this console with the given ScriptId.

Syntax

Parameters

scriptId

The ScriptId to clear from the log.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Clear Method

Clears all messages in this console with the given tag.

Syntax

Parameters

tag

The tag to clear from the log.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


ConsoleHistory Field

The maximum number of messages to store on this console.

Value: 128

Syntax

public const int ConsoleHistory

Returns

The maximum number of messages stored by the console.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Messages Property

All current log messages.

Syntax

Value

All currently stored log messages.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Write Method

Writes a debug message to the server log.

Syntax

Parameters

message

The message to be logged.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Write Method

Writes a debug message to the server log.

Syntax

Parameters

logLevel

Message level

message

The message to be logged.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Write Method

Writes a debug message to the server log.

Syntax

Parameters

tag

A freeform string tag for filtering the message.

message

The message to be logged.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Write Method

Writes a message to the script console.

Syntax

Parameters

logLevel

LogLevel of the message.

tag

Tag for the message.

message

Message to log.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Log.Message Struct

Represents a single console message.

Syntax

public struct Log.Message

Member Details

LogLevel Property

Message severity for filtering.

Syntax

public LogLevel LogLevel { get; }

Value

The Sansar.Script.LogLevel of the message.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


ScriptId Property

Source script id.

Syntax

public ScriptId ScriptId { get; }

Value

The Sansar.Script.ScriptId of the source of the message.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Tag Property

Free form tag which can be used to filter messages.

Syntax

public string Tag { get; }

Value

The tag of the message.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Text Property

The text of the message.

Syntax

public string Text { get; }

Value

The text of the message.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


TimeStamp Property

Time the message was written.

Syntax

public DateTime TimeStamp { get; }

Value

The timestamp of the message.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


ToString Method

String representation of the message.

Syntax

public override string ToString ()

Returns

String representation of the message.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


LogLevel

cara

May 28, 2019 16:02

Follow

Sansar.Script : Sansar.Script Namespace

Overview

Signature

Remarks

Members

Member Details

LogLevel Enum

Used by Sansar.Script.Log to filter messages.

Syntax

[System.Flags] public enum LogLevel

Remarks

Members

Member NameDescription

Error

Error messages.

Info

Basic informational messages.

Warning

Warning messages.

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Last updated