docs.unity3d.com
Search Results for

    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
    Implements
    IBuildLogger
    IContextObject
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Build.Pipeline.Utilities
    Assembly: Unity.ScriptableBuildPipeline.Editor.dll
    Syntax
    [Serializable]
    public class BuildLog : IBuildLogger, IContextObject

    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.

    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, bool)

    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.

    bool multiThreaded

    EndBuildStep()

    Ends the build step.

    Declaration
    public void 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.

    Implements

    IBuildLogger
    IContextObject

    Extension Methods

    BuildLoggerExternsions.AddEntrySafe(IBuildLogger, LogLevel, string)
    BuildLoggerExternsions.ScopedStep(IBuildLogger, LogLevel, string, bool)
    BuildLoggerExternsions.ScopedStep(IBuildLogger, LogLevel, string, string)
    In This Article
    Back to top
    Copyright © 2024 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)