Table of Contents

Class ContentBuildLogger

Namespace
Microsoft.Xna.Framework.Content.Pipeline
Assembly
MonoGame.Framework.Content.Pipeline.dll

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

string

LoggerRootDirectory

Gets or sets the base reference path used when reporting errors during the content build process.

public string LoggerRootDirectory { get; set; }

Property Value

string

Methods

GetCurrentFilename(ContentIdentity)

Gets the filename currently being processed, for use in warning and error messages.

protected string GetCurrentFilename(ContentIdentity contentIdentity)

Parameters

contentIdentity ContentIdentity

Identity 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

message string

Message being reported.

messageArgs object[]

Arguments for the reported message.

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

message string

Message being reported.

messageArgs object[]

Arguments for the reported message.

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 string

Link to an existing online help topic containing related information.

contentIdentity ContentIdentity

Identity of the content item that generated the message.

message string

Message 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 string

Name of the file containing future messages.

Unindent()

public void Unindent()