Class ContentBuildLogger
Provides methods for reporting informational messages or warnings from content importers and processors. Do not use this class to report errors. Instead, report errors by throwing a PipelineException or InvalidContentException.
public abstract class ContentBuildLogger
- Inheritance
-
ContentBuildLogger
- Derived
- Inherited Members
Constructors
ContentBuildLogger()
Initializes a new instance of ContentBuildLogger.
protected ContentBuildLogger()
Properties
IndentString
protected string IndentString { get; }
Property Value
LoggerRootDirectory
Gets or sets the base reference path used when reporting errors during the content build process.
public string LoggerRootDirectory { get; set; }
Property Value
Methods
GetCurrentFilename(ContentIdentity)
Gets the filename currently being processed, for use in warning and error messages.
protected string GetCurrentFilename(ContentIdentity contentIdentity)
Parameters
contentIdentity
ContentIdentityIdentity of a content item. If specified, GetCurrentFilename uses this value to refine the search. If no value is specified, the current PushFile state is used.
Returns
- string
Name of the file being processed.
Indent()
public void Indent()
LogImportantMessage(string, params object[])
Outputs a high-priority status message from a content importer or processor.
public abstract void LogImportantMessage(string message, params object[] messageArgs)
Parameters
LogMessage(string, params object[])
Outputs a low priority status message from a content importer or processor.
public abstract void LogMessage(string message, params object[] messageArgs)
Parameters
LogWarning(string, ContentIdentity, string, params object[])
Outputs a warning message from a content importer or processor.
public abstract void LogWarning(string helpLink, ContentIdentity contentIdentity, string message, params object[] messageArgs)
Parameters
helpLink
stringLink to an existing online help topic containing related information.
contentIdentity
ContentIdentityIdentity of the content item that generated the message.
message
stringMessage being reported.
messageArgs
object[]Arguments for the reported message.
PopFile()
Outputs a message indicating that a content asset has completed processing.
public void PopFile()
PushFile(string)
Outputs a message indicating that a content asset has begun processing. All logger warnings or error exceptions from this time forward to the next PopFile call refer to this file.
public void PushFile(string filename)
Parameters
filename
stringName of the file containing future messages.
Unindent()
public void Unindent()