LogEvent Struct

Namespace: Improbable.Gdk.CoreSource

Represents a single log. Can contain data used for structured logging.


Fields

Message Source
readonly string Message

The main content of the log.

Data Source
readonly Dictionary<string, object> Data

The data used for structured logging.

Context Source
UnityEngine.Object Context

Optional context object used with Unity logging.

Exception Source
Exception Exception

An exception if the LogEvent is associated with an exception.


Constructors

LogEvent Source
LogEvent(string message)

Constructor for the log event

Parameters
  • string message : The log content.


Methods

WithField Source
LogEvent WithField(string key, object value)

Sets additional information to be displayed with the log message.

Returns:
Itself

Parameters
  • string key : The key.
  • object value : The value.

WithContext Source
LogEvent WithContext(UnityEngine.Object context)

Adds a context object to be passed as the second parameter into UnityEngine.Debug.Log(object, UnityEngine.Object)

Returns:
Itself

Parameters
  • UnityEngine.Object context : The context object

WithException Source
LogEvent WithException(Exception exception)

Associates an exception to the LogEvent.

Returns:
Itself

Parameters
  • Exception exception : The exception


Overrides

ToString Source
override string ToString()

Updated about a year ago


LogEvent Struct


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.