RecordTask Class

Summary

A task that records the build's output to a file. Loosely based on Ant's Record task.
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks
Base Types
  • Task
graph BT Type-->Base0["Task"] Type["RecordTask"] class Type type-node

Syntax

[TaskName("record")]
public class RecordTask : Task

Examples

    <record name="${outputdir}\Buildlog.txt" level="Info" action="Start"/>
<record name="${outputdir}\Buildlog.txt" action="Close"/>

Remarks

This task allows you to record the build's output, or parts of it to a file. You can start and stop recording at any place in the build process.

Attributes

Type Description
TaskName

Properties

Name Value Summary
Action RecordTask.ActionType
Action to apply to this log instance - either NAnt.Contrib.Tasks.RecordTask.ActionType.Start, NAnt.Contrib.Tasks.RecordTask.ActionType.Stop, NAnt.Contrib.Tasks.RecordTask.ActionType.Close or NAnt.Contrib.Tasks.RecordTask.ActionType.Flush.
AutoFlush bool
Determines whether the recorder will flush it's buffer after every write to it. The default is false.
LogName FileInfo
Name of destination file.
ThresholdLevel Level
Determine the level of logging - either Level.Debug, Level.Verbose, Level.Info, Level.Warning or Level.Error. The default is Level.Info.

Methods

Name Value Summary
ExecuteTask() void
This is where the work is done.