docs.unity3d.com
    Show / Hide Table of Contents

    Struct LogDecorateHandlerScope

    Disposable struct that adds decorate handler LoggerManager.OutputWriterDecorateHandler> f to the scope

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Logging.Internal
    Syntax
    [BurstCompile]
    public readonly struct LogDecorateHandlerScope : IDisposable
    Remarks

    Examples:

      using LogDecorateHandlerScope a = Log.Decorate('ThreadId', DecoratorFunctions.DecoratorThreadId, true);

    or

      using LogDecorateHandlerScope threadIdDecor = Log.To(log2).Decorate('ThreadId', DecoratorFunctions.DecoratorThreadId, false);

    Constructors

    LogDecorateHandlerScope(FunctionPointer<LoggerManager.OutputWriterDecorateHandler>)

    Adds a global (for all loggers / logs calls) decorator handler.

    Constructor for this type of call:

    using LogDecorateHandlerScope a = Log.Decorate('ThreadId', DecoratorFunctions.DecoratorThreadId, true);
    Declaration
    public LogDecorateHandlerScope(FunctionPointer<LoggerManager.OutputWriterDecorateHandler> f)
    Parameters
    Type Name Description
    FunctionPointer<LoggerManager.OutputWriterDecorateHandler> f

    decorate handler LoggerManager.OutputWriterDecorateHandler

    LogDecorateHandlerScope(FunctionPointer<LoggerManager.OutputWriterDecorateHandler>, LogControllerScopedLock)

    Adds a decorator handler for a particular logger

    Constructor for this type of call:

      using LogDecorateHandlerScope a = Log.To(log2).Decorate('ThreadId', DecoratorFunctions.DecoratorThreadId, true);
    LogControllerScopedLock
    Declaration
    public LogDecorateHandlerScope(FunctionPointer<LoggerManager.OutputWriterDecorateHandler> f, LogControllerScopedLock lock)
    Parameters
    Type Name Description
    FunctionPointer<LoggerManager.OutputWriterDecorateHandler> f

    decorate handler LoggerManager.OutputWriterDecorateHandler

    LogControllerScopedLock lock

    The lock for LogController

    Remarks

    Warning: the lock is disposed because it can't be held for the whole scope.

    Methods

    Dispose()

    Removes decorator handler added in the constructor.

    Declaration
    public readonly void Dispose()
    Implements
    IDisposable.Dispose()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023