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 voidarrow-up-right 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 intarrow-up-right 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 LogLevelarrow-up-right LogLevel { get; }

Value

The Sansar.Script.LogLevelarrow-up-right 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 stringarrow-up-right 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 stringarrow-up-right 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 DateTimearrow-up-right 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 stringarrow-up-right 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

Avatar

caraarrow-up-right

May 28, 2019 16:02

Followarrow-up-right

Sansar.Scriptarrow-up-right : Sansar.Script Namespacearrow-up-right

Overviewarrow-up-right

Signaturearrow-up-right

Remarksarrow-up-right

Membersarrow-up-right

Member Detailsarrow-up-right

LogLevel Enum

Used by Sansar.Script.Logarrow-up-right to filter messages.

Syntax

[System.Flags] public enum LogLevel

Remarks

Members

Member Name
Description

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