Class BuildLog
Basic implementation of IBuildLogger. Stores events in memory and can dump them to the trace event format. IBuildLogger
Inherited Members
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. |