docs.unity3d.com
    Show / Hide Table of Contents

    Class LoggerConfig

    Configuration for Logger. Can be used to setup Logger and create it.

    Inheritance
    Object
    LoggerConfig
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Logging
    Syntax
    public class LoggerConfig

    Constructors

    LoggerConfig()

    Create LoggerConfig to setup a new Logger

    Declaration
    public LoggerConfig()

    Fields

    MinimumLevel

    Set minimal LogLevel that will be processed by the Logger

    Declaration
    public readonly LoggerMinimumLevelConfig MinimumLevel
    Field Value
    Type Description
    LoggerMinimumLevelConfig

    Properties

    WriteTo

    Use this method to add new Sink

    Declaration
    public LoggerWriterConfig WriteTo { get; }
    Property Value
    Type Description
    LoggerWriterConfig

    Methods

    CreateLogger()

    Call that creates Logger using default LogMemoryManagerParameters

    Declaration
    public Logger CreateLogger()
    Returns
    Type Description
    Logger

    New Logger that is created using this configuration.

    CreateLogger(LogMemoryManagerParameters)

    Call that creates Logger

    Declaration
    public Logger CreateLogger(LogMemoryManagerParameters logMemoryManagerParameters)
    Parameters
    Type Name Description
    LogMemoryManagerParameters logMemoryManagerParameters

    LogMemoryManagerParameters to initialize LogMemoryManager with.

    Returns
    Type Description
    Logger

    New Logger that is created using this configuration.

    GetOutputTemplate()

    Returns current template that is used. See also OutputTemplate(FixedString512Bytes)

    Declaration
    public FixedString512Bytes GetOutputTemplate()
    Returns
    Type Description
    FixedString512Bytes

    Current template that is used

    OutputTemplate(FixedString512Bytes)

    Template that should be used by sinks by default. All sinks without explicit OutputTemplate will use this one after this call.

    Declaration
    public LoggerConfig OutputTemplate(FixedString512Bytes newTemplate)
    Parameters
    Type Name Description
    FixedString512Bytes newTemplate

    Template for the messages. Can use any strings and {Level}, {Timestamp}, {Message} as special holes.

    Returns
    Type Description
    LoggerConfig

    Config to continue methods chain

    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