{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Struct LogDecorateScope | Unity Logging | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct LogDecorateScope

    Disposable struct that adds Decorations to the logs in the scope, or to some particular log

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Logging
    Assembly: solution.dll
    Syntax
    [BurstCompile]
    public readonly struct LogDecorateScope : IDisposable
    Remarks

    Example:

    using LogDecorateScope decorConst1 = Log.To(log).Decorate('ConstantExampleLog1', 999999);

    or

    using LogDecorateScope decorConstAll = Log.Decorate('ToAll', 42);

    It will Dispose (unlock) m_Lock that is passed in and was created in .To(log2) The way it works internally is:

    ref var dec = ref LogController.BeginEditDecoratePayloadHandles(ref ctx.Lock, out var nBefore);
    
      -- Adds decoration to(ref dec); --
    
    var payloadHandles = LogController.EndEditDecoratePayloadHandles(ref logController, nBefore);
    
    return new LogDecorateScope(logController.Handle, payloadHandles);

    Constructors

    Name Description
    LogDecorateScope(LogControllerScopedLock, FixedList64Bytes<PayloadHandle>)

    Creates the LogDecorateScope ReleaseDecoratePayloadBufferDeferred(LoggerHandle, FixedList64Bytes<PayloadHandle>)

    Methods

    Name Description
    Dispose()

    Payload handles will be deferred-released in this call.

    In This Article
    Back to top
    Copyright © 2023 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)