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.
Syntaxpublic void Clear ()
Remarks
RequirementsNamespace: 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.
SyntaxParameters
logLevel
The LogLevel to clear from the log. Multiple loglevels can be cleared in a single cal.
Remarks
RequirementsNamespace: 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.
SyntaxParameters
scriptId
The ScriptId to clear from the log.
Remarks
RequirementsNamespace: 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.
SyntaxParameters
tag
The tag to clear from the log.
Remarks
RequirementsNamespace: 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
Syntaxpublic const int ConsoleHistory
Returns
The maximum number of messages stored by the console.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Messages Property
All current log messages.
SyntaxValue
All currently stored log messages.
Remarks
RequirementsNamespace: 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.
SyntaxParameters
message
The message to be logged.
Remarks
RequirementsNamespace: 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.
SyntaxParameters
logLevel
Message level
message
The message to be logged.
Remarks
RequirementsNamespace: 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.
SyntaxParameters
tag
A freeform string tag for filtering the message.
message
The message to be logged.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Write Method
Writes a message to the script console.
SyntaxParameters
logLevel
LogLevel of the message.
tag
Tag for the message.
message
Message to log.
Remarks
RequirementsNamespace: 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.
Syntaxpublic LogLevel LogLevel { get; }
Value
The Sansar.Script.LogLevel of the message.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
ScriptId Property
Source script id.
Syntaxpublic ScriptId ScriptId { get; }
Value
The Sansar.Script.ScriptId of the source of the message.
Remarks
RequirementsNamespace: 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.
Syntaxpublic string Tag { get; }
Value
The tag of the message.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Text Property
The text of the message.
Syntaxpublic string Text { get; }
Value
The text of the message.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
TimeStamp Property
Time the message was written.
Syntaxpublic DateTime TimeStamp { get; }
Value
The timestamp of the message.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
ToString Method
String representation of the message.
Syntaxpublic override string ToString ()
Returns
String representation of the message.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
LogLevel
May 28, 2019 16:02
Sansar.Script : Sansar.Script Namespace
LogLevel Enum
Used by Sansar.Script.Log 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