Class BuildLog
Basic implementation of IBuildLogger. Stores events in memory and can dump them to the trace event format. IBuildLogger
Namespace: UnityEditor.Build.Pipeline.Utilities
Syntax
public class BuildLog : object, 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
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
EndBuildStep()
Ends the build step.
Declaration
public void EndBuildStep()
Implements
FormatForTraceEventProfiler()
Converts the captured build log events into the text Trace Event Profiler format
Declaration
public string FormatForTraceEventProfiler()
Returns
| Type | Description |
|---|---|
| String | Profile data. |