Sites

Menu

LogEvent Struct

Namespace: Improbable.Gdk.Core
GDK package: Core
Source

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()

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums