C# Class NAnt.Core.DefaultLogger

Inheritance: IBuildLogger
显示文件 Open project: skolima/NAnt Class Usage Examples

Public Methods

Method Description
BuildFinished ( object sender, BuildEventArgs e ) : void

Signals that the last target has finished.

This event will still be fired if an error occurred during the build.

BuildStarted ( object sender, BuildEventArgs e ) : void

Signals that a build has started.

This event is fired before any targets have started.

DefaultLogger ( ) : System

Initializes a new instance of the DefaultLogger class.

Flush ( ) : void

Flushes buffered build events or messages to the underlying storage.

MessageLogged ( object sender, BuildEventArgs e ) : void

Signals that a message has been logged.

Only messages with a priority higher or equal to the threshold of the logger will actually be output in the build log.

TargetFinished ( object sender, BuildEventArgs e ) : void

Signals that a task has finished.

This event will still be fired if an error occurred during the build.

TargetStarted ( object sender, BuildEventArgs e ) : void

Signals that a target has started.

TaskFinished ( object sender, BuildEventArgs e ) : void

Signals that a task has finished.

This event will still be fired if an error occurred during the build.

TaskStarted ( object sender, BuildEventArgs e ) : void

Signals that a task has started.

Protected Methods

Method Description
Log ( string message ) : void

Empty implementation which allows derived classes to receive the output that is generated in this logger.

Private Methods

Method Description
CreateBuildEvent ( Level messageLevel, string message ) : BuildEventArgs
OutputMessage ( BuildEventArgs e ) : void

Outputs an indented message to the build log if its priority is greather than or equal to the Threshold of the logger.

OutputMessage ( BuildEventArgs e, int indentationLength ) : void

Outputs an indented message to the build log if its priority is greather than or equal to the Threshold of the logger.

OutputMessage ( Level messageLevel, string message, int indentationLength ) : void

Outputs an indented message to the build log if its priority is greather than or equal to the Threshold of the logger.

Method Details

BuildFinished() public method

Signals that the last target has finished.
This event will still be fired if an error occurred during the build.
public BuildFinished ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

BuildStarted() public method

Signals that a build has started.
This event is fired before any targets have started.
public BuildStarted ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

DefaultLogger() public method

Initializes a new instance of the DefaultLogger class.
public DefaultLogger ( ) : System
return System

Flush() public method

Flushes buffered build events or messages to the underlying storage.
public Flush ( ) : void
return void

Log() protected method

Empty implementation which allows derived classes to receive the output that is generated in this logger.
protected Log ( string message ) : void
message string The message being logged.
return void

MessageLogged() public method

Signals that a message has been logged.
Only messages with a priority higher or equal to the threshold of the logger will actually be output in the build log.
public MessageLogged ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TargetFinished() public method

Signals that a task has finished.
This event will still be fired if an error occurred during the build.
public TargetFinished ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TargetStarted() public method

Signals that a target has started.
public TargetStarted ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TaskFinished() public method

Signals that a task has finished.
This event will still be fired if an error occurred during the build.
public TaskFinished ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TaskStarted() public method

Signals that a task has started.
public TaskStarted ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void