docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LogRecord

    An individual log record

    Inheritance
    object
    LogRecord
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Apis.Admin.Observability
    Assembly: Unity.Services.Apis.dll
    Syntax
    [DataContract(Name = "log-record")]
    [Preserve]
    public class LogRecord

    Constructors

    LogRecord(string, string, int, string, Dictionary<string, string>, Dictionary<string, string>)

    Initializes a new instance of the LogRecord class.

    Declaration
    [Preserve]
    public LogRecord(string timestamp = null, string severityText = null, int severityNumber = 0, string body = null, Dictionary<string, string> resourceAttributes = null, Dictionary<string, string> logAttributes = null)
    Parameters
    Type Name Description
    string timestamp

    The timestamp of the record, in RFC3339 format.

    string severityText

    The human-readable severity text.

    int severityNumber

    The matching severity number of the severity text. Refer to OpenTelemetry docs for mappings..

    string body

    The log message.

    Dictionary<string, string> resourceAttributes

    OpenTelemetry attributes associated with the origin of the log entry.

    Dictionary<string, string> logAttributes

    OpenTelemetry Log Attributes associated with the particular log entry, can contain user-defined attributes.

    Properties

    Body

    The log message

    Declaration
    [DataMember(Name = "body", EmitDefaultValue = false)]
    [Preserve]
    public string Body { get; set; }
    Property Value
    Type Description
    string

    The log message

    LogAttributes

    OpenTelemetry Log Attributes associated with the particular log entry, can contain user-defined attributes

    Declaration
    [DataMember(Name = "logAttributes", EmitDefaultValue = false)]
    [Preserve]
    public Dictionary<string, string> LogAttributes { get; set; }
    Property Value
    Type Description
    Dictionary<string, string>

    OpenTelemetry Log Attributes associated with the particular log entry, can contain user-defined attributes

    ResourceAttributes

    OpenTelemetry attributes associated with the origin of the log entry

    Declaration
    [DataMember(Name = "resourceAttributes", EmitDefaultValue = false)]
    [Preserve]
    public Dictionary<string, string> ResourceAttributes { get; set; }
    Property Value
    Type Description
    Dictionary<string, string>

    OpenTelemetry attributes associated with the origin of the log entry

    SeverityNumber

    The matching severity number of the severity text. Refer to OpenTelemetry docs for mappings.

    Declaration
    [DataMember(Name = "severityNumber", EmitDefaultValue = false)]
    [Preserve]
    public int SeverityNumber { get; set; }
    Property Value
    Type Description
    int

    The matching severity number of the severity text. Refer to OpenTelemetry docs for mappings.

    SeverityText

    The human-readable severity text

    Declaration
    [DataMember(Name = "severityText", EmitDefaultValue = false)]
    [Preserve]
    public string SeverityText { get; set; }
    Property Value
    Type Description
    string

    The human-readable severity text

    Timestamp

    The timestamp of the record, in RFC3339 format

    Declaration
    [DataMember(Name = "timestamp", EmitDefaultValue = false)]
    [Preserve]
    public string Timestamp { get; set; }
    Property Value
    Type Description
    string

    The timestamp of the record, in RFC3339 format

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)