docs.unity3d.com
    Show / Hide Table of Contents

    Class BuildLog

    Basic implementation of IBuildLogger. Stores events in memory and can dump them to the trace event format. IBuildLogger

    Inheritance
    Object
    BuildLog
    Namespace: UnityEditor.Build.Pipeline.Utilities
    Syntax
    [Serializable]
    public class BuildLog : IBuildLogger, IContextObject, IDeferredBuildLogger

    Constructors

    BuildLog()

    Creates a new build log object.

    Declaration
    public BuildLog()

    Methods

    AddEntry(LogLevel, String)

    Adds details to the active build step

    Declaration
    public void AddEntry(LogLevel level, string msg)
    Parameters
    Type Name Description
    LogLevel level

    The log level of this entry.

    String msg

    The message to add.

    Implements
    IBuildLogger.AddEntry(LogLevel, String)

    AddMetaData(String, String)

    Adds a key value pair to the MetaData list. This can be used to store things like package version numbers.

    Declaration
    public void AddMetaData(string key, string value)
    Parameters
    Type Name Description
    String key

    The key for the MetaData.

    String value

    The value of the MetaData.

    BeginBuildStep(LogLevel, String, Boolean)

    Should be called when beginning a build step.

    Declaration
    public void BeginBuildStep(LogLevel level, string stepName, bool multiThreaded)
    Parameters
    Type Name Description
    LogLevel level

    The log level of this step.

    String stepName

    A name associated with the step. It is recommended that this name does not include specific context about the step; dynamic context should be added under the step as an entry.

    Boolean multiThreaded
    Implements
    IBuildLogger.BeginBuildStep(LogLevel, String, Boolean)

    EndBuildStep()

    Ends the build step.

    Declaration
    public void EndBuildStep()
    Implements
    IBuildLogger.EndBuildStep()

    FormatForTraceEventProfiler()

    Converts the captured build log events into the text Trace Event Profiler format

    Declaration
    public string FormatForTraceEventProfiler()
    Returns
    Type Description
    String

    Profile data.

    Extension Methods

    BuildLoggerExternsions.AddEntrySafe(IBuildLogger, LogLevel, String)
    BuildLoggerExternsions.ScopedStep(IBuildLogger, LogLevel, String, Boolean)
    BuildLoggerExternsions.ScopedStep(IBuildLogger, LogLevel, String, String)
    Back to top
    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