# Log.Message

Kind: Struct · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-struct" data-pagefind-filter="kind:Struct">Struct</span>
<span data-pagefind-filter="namespace:Sansar.Script">Namespace <a href="/scripting/api/sansar.script"><code>Sansar.Script</code></a></span>
</div>

<span id="T:Sansar.Script.Log.Message"></span>

Represents a single console message.

```csharp
public struct Log.Message
```

## Members at a glance

| Kind | Members |
|---|---|
| **Properties** | [LogLevel](#loglevel) · [ScriptId](#scriptid) · [Tag](#tag) · [Text](#text) · [TimeStamp](#timestamp) |
| **Methods** | [ToString](#tostring) |

## Properties

### LogLevel

<div class="api-card">
<span id="P:Sansar.Script.Log.Message.LogLevel"></span>
<div class="api-badges"><span class="api-badge api-deprecated">Deprecated</span></div>

```csharp signature
[System.Obsolete("Messages are no longer stored.", true)]
[get: System.Runtime.CompilerServices.IsReadOnly]
public LogLevel LogLevel { get; }
```

Message severity for filtering.

**Value:** [LogLevel](/scripting/api/sansar.script/loglevel) — The [`LogLevel`](/scripting/api/sansar.script/loglevel) of the message.

</div>

### ScriptId

<div class="api-card">
<span id="P:Sansar.Script.Log.Message.ScriptId"></span>
<div class="api-badges"><span class="api-badge api-deprecated">Deprecated</span></div>

```csharp signature
[System.Obsolete("Messages are no longer stored.", true)]
[get: System.Runtime.CompilerServices.IsReadOnly]
public ScriptId ScriptId { get; }
```

Source script id.

**Value:** [ScriptId](/scripting/api/sansar.script/scriptid) — The [`ScriptId`](/scripting/api/sansar.script/scriptid) of the source of the message.

</div>

### Tag

<div class="api-card">
<span id="P:Sansar.Script.Log.Message.Tag"></span>
<div class="api-badges"><span class="api-badge api-deprecated">Deprecated</span></div>

```csharp signature
[System.Obsolete("Messages are no longer stored.", true)]
[get: System.Runtime.CompilerServices.IsReadOnly]
public string Tag { get; }
```

Free form tag which can be used to filter messages.

**Value:** [string](https://learn.microsoft.com/dotnet/api/system.string) — The tag of the message.

</div>

### Text

<div class="api-card">
<span id="P:Sansar.Script.Log.Message.Text"></span>
<div class="api-badges"><span class="api-badge api-deprecated">Deprecated</span></div>

```csharp signature
[System.Obsolete("Messages are no longer stored.", true)]
[get: System.Runtime.CompilerServices.IsReadOnly]
public string Text { get; }
```

The text of the message.

**Value:** [string](https://learn.microsoft.com/dotnet/api/system.string) — The text of the message.

</div>

### TimeStamp

<div class="api-card">
<span id="P:Sansar.Script.Log.Message.TimeStamp"></span>
<div class="api-badges"><span class="api-badge api-deprecated">Deprecated</span></div>

```csharp signature
[System.Obsolete("Messages are no longer stored.", true)]
public DateTime TimeStamp { get; }
```

Time the message was written.

**Value:** [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) — The timestamp of the message.

</div>


## Methods

### ToString

<div class="api-card">
<span id="M:Sansar.Script.Log.Message.ToString"></span>
<span id="M:Sansar.Script.Log.Message.ToString()"></span>

```csharp signature
public override string ToString()
```

String representation of the message.

**Returns:** [string](https://learn.microsoft.com/dotnet/api/system.string) — String representation of the message.

</div>


## Used in examples

- [StatsExample.cs](/scripting/examples/stats-example)
- [VisitorTrackerExample.cs](/scripting/examples/visitor-tracker)
- [AgentGravityExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentGravityExample.cs)
- [AgentScaleExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentScaleExample.cs)
- [BanHammerExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/BanHammerExample.cs)
- `CameraShakeExample.cs`
- `ColorLutExample.cs`
- [CommandExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/CommandExample.cs)
- [DataStoreExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/DataStoreExample.cs)
- [GravityExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/GravityExample.cs)
- [MediaOverrideExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/MediaOverrideExample.cs)
- [MemoryExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/MemoryExample.cs)

…and 12 more examples in the snapshot.

<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>