docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ArgumentInfo

    Parsed Argument/Hole data. See https://messagetemplates.org/ for Holes

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Logging
    Assembly: Unity.Logging.dll
    Syntax
    public readonly struct ArgumentInfo

    Constructors

    ArgumentInfo(int, FixedString512Bytes, DestructingType, FixedString512Bytes, int)

    Constructor of the ArgumentInfo

    Declaration
    public ArgumentInfo(int index, FixedString512Bytes name, ArgumentInfo.DestructingType destructingType, FixedString512Bytes format, int alignment)
    Parameters
    Type Name Description
    int index

    Integer in the hole, like {0} or {42}, if not set see Name

    FixedString512Bytes name

    Name of the hole, like or default if Index is used instead

    ArgumentInfo.DestructingType destructingType

    @, $ or default

    FixedString512Bytes format

    Format - custom string after :

    int alignment

    Integer after comma, before :

    Fields

    Alignment

    Alignment that is specified after ','

    Declaration
    public readonly int Alignment
    Field Value
    Type Description
    int

    BuiltInLevelId

    Builtin code for the level context argument

    Declaration
    public const int BuiltInLevelId = -101
    Field Value
    Type Description
    int

    BuiltInMessage

    Builtin code for the message context argument

    Declaration
    public const int BuiltInMessage = -102
    Field Value
    Type Description
    int

    BuiltInNewLine

    Builtin code for the newline context argument

    Declaration
    public const int BuiltInNewLine = -104
    Field Value
    Type Description
    int

    BuiltInProperties

    Builtin code for the properties context argument

    Declaration
    public const int BuiltInProperties = -105
    Field Value
    Type Description
    int

    BuiltInStackTrace

    Builtin code for the stacktrace context argument

    Declaration
    public const int BuiltInStackTrace = -103
    Field Value
    Type Description
    int

    BuiltInTimestampId

    Builtin code for the timestamp context argument

    Declaration
    public const int BuiltInTimestampId = -100
    Field Value
    Type Description
    int

    Destructing

    See ArgumentInfo.DestructingType

    Declaration
    public readonly ArgumentInfo.DestructingType Destructing
    Field Value
    Type Description
    ArgumentInfo.DestructingType

    Format

    Format that is specified after ':'

    Declaration
    public readonly FixedString512Bytes Format
    Field Value
    Type Description
    FixedString512Bytes

    Index

    Indexed hole (if no Name was specified)

    Declaration
    public readonly int Index
    Field Value
    Type Description
    int

    IsValidByte

    Non-Zero if created

    Declaration
    public readonly byte IsValidByte
    Field Value
    Type Description
    byte

    Name

    Name of the hole

    Declaration
    public readonly FixedString512Bytes Name
    Field Value
    Type Description
    FixedString512Bytes

    Type

    ArgumentInfo.HoleType of this hole.

    Declaration
    public readonly ArgumentInfo.HoleType Type
    Field Value
    Type Description
    ArgumentInfo.HoleType

    Properties

    IsBuiltIn

    True if the ArgumentInfo.HoleType is not built-in, but user defined.

    Declaration
    public bool IsBuiltIn { get; }
    Property Value
    Type Description
    bool

    IsValid

    True if created

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    Methods

    Number(int)

    Create a hole from a number (index)

    Declaration
    public static ArgumentInfo Number(int i)
    Parameters
    Type Name Description
    int i

    index to use

    Returns
    Type Description
    ArgumentInfo

    ArgumentInfo with Index == i

    ParseArgument(byte*, int, in ParseSegment)

    Parses ArgumentInfo from UTF8 string's segment

    Declaration
    public static ArgumentInfo ParseArgument(byte* rawMsgBuffer, int rawMsgBufferLength, in ParseSegment currArgSegment)
    Parameters
    Type Name Description
    byte* rawMsgBuffer

    Pointer to UTF8 string

    int rawMsgBufferLength

    Full length of the UTF8 string

    ParseSegment currArgSegment

    Segment to parse inside the UTF8 string

    Returns
    Type Description
    ArgumentInfo

    Parsed ArgumentInfo or default if error occured

    RetrieveContextArgumentIndex(in byte*, in ParseSegment, bool)

    Returns an index of the context argument to use in WriteMessage or builtin code

    Declaration
    public static int RetrieveContextArgumentIndex(in byte* rawBuffer, in ParseSegment argSlotSegment, bool isThisTemplate)
    Parameters
    Type Name Description
    byte* rawBuffer

    Pointer to argument UTF8 string

    ParseSegment argSlotSegment

    Segment inside the UTF8 string

    bool isThisTemplate

    True if this is a template (so is valid)

    Returns
    Type Description
    int

    Index of the context argument to use in WriteMessage or builtin code

    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)