Class BuildLoggerExternsions
Contains extension methods for the IBuildLogger interface
Inherited Members
Namespace: UnityEditor.Build.Pipeline.Interfaces
Assembly: Unity.ScriptableBuildPipeline.Editor.dll
Syntax
public static class BuildLoggerExternsions
Methods
AddArgSafe(IBuildLogger, string, string)
Adds a named key/value arg to the active build step. No-op if log is null or does not support named args.
Declaration
public static void AddArgSafe(this IBuildLogger log, string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| IBuildLogger | log | The build log. |
| string | key | The arg key. |
| string | value | The arg value. |
AddEntrySafe(IBuildLogger, LogLevel, string)
Adds details to the active build step
Declaration
public static void AddEntrySafe(this IBuildLogger log, LogLevel level, string msg)
Parameters
| Type | Name | Description |
|---|---|---|
| IBuildLogger | log | The build log. |
| LogLevel | level | The log level of this entry. |
| string | msg | The message to add. |
ScopedStep(IBuildLogger, LogLevel, string, bool)
Begins a new build step and returns an ScopedBuildStep which will end the build step when disposed. It is recommended to use this in conjunction with the using statement.
Declaration
public static ScopedBuildStep ScopedStep(this IBuildLogger log, LogLevel level, string stepName, bool multiThreaded = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IBuildLogger | log | The build log. |
| LogLevel | level | The log level of this step. |
| string | stepName | A name associated with the step. |
| bool | multiThreaded | True if within this build step the IBuildLogger will be used on multiple threads. |
Returns
| Type | Description |
|---|---|
| ScopedBuildStep | Returns a ScopedBuildStep that will end the build step when it is disposed. |
ScopedStep(IBuildLogger, LogLevel, string, bool, params (string key, string value)[])
Begins a new build step with named args and threading support, and returns a ScopedBuildStep.
Declaration
public static ScopedBuildStep ScopedStep(this IBuildLogger log, LogLevel level, string stepName, bool multiThreaded, params (string key, string value)[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| IBuildLogger | log | The build log. |
| LogLevel | level | The log level of this step. |
| string | stepName | A name associated with the step. |
| bool | multiThreaded | True if within this build step the IBuildLogger will be used on multiple threads. |
| (string key, string value)[] | args | Named key/value pairs to attach to the step as Perfetto event args. |
Returns
| Type | Description |
|---|---|
| ScopedBuildStep | Returns a ScopedBuildStep that will end the build step when it is disposed. |
ScopedStep(IBuildLogger, LogLevel, string, string)
Begins a new build step and returns an ScopedBuildStep which will end the build step when disposed. It is recommended to use this in conjunction with the using statement.
Declaration
public static ScopedBuildStep ScopedStep(this IBuildLogger log, LogLevel level, string stepName, string context)
Parameters
| Type | Name | Description |
|---|---|---|
| IBuildLogger | log | The build log. |
| LogLevel | level | The log level of this step. |
| string | stepName | A name associated with the step. |
| string | context | Adds an entry message the build step. This allows attaching specific context data without changing the stepName. |
Returns
| Type | Description |
|---|---|
| ScopedBuildStep | Returns a ScopedBuildStep that will end the build step when it is disposed. |
ScopedStep(IBuildLogger, LogLevel, string, params (string key, string value)[])
Begins a new build step with named args attached, and returns a ScopedBuildStep.
Declaration
public static ScopedBuildStep ScopedStep(this IBuildLogger log, LogLevel level, string stepName, params (string key, string value)[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| IBuildLogger | log | The build log. |
| LogLevel | level | The log level of this step. |
| string | stepName | A name associated with the step. |
| (string key, string value)[] | args | Named key/value pairs to attach to the step as Perfetto event args. |
Returns
| Type | Description |
|---|---|
| ScopedBuildStep | Returns a ScopedBuildStep that will end the build step when it is disposed. |