Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

TraceHelper

This module contains function which allow to trace build output

Nested types and modules

TypeDescription
FAKEException

Functions and values

Function or valueDescription
closeAllOpenTags()
Signature: unit -> unit
closeTag(tag)
Signature: tag:string -> unit

Removes an opening tag from the internal tag stack

console
Signature: ITraceListener
exceptionAndInnersToString(ex)
Signature: ex:Exception -> string

Converts an exception and its inner exceptions to a nice string.

fakePath
Signature: string

Gets the path of the current FAKE instance

fakeVersion
Signature: string

Gets the FAKE version no.

fakeVersionStr
Signature: string

Gets the FAKE Version string

log(message)
Signature: message:string -> unit

Logs the specified string

Log message files
Signature: message:string -> files:seq<string> -> unit

Logs the given files with the message.

logf(fmt)
Signature: fmt:StringFormat<'?13379,unit> -> '?13379
Type parameters: '?13379

Logs the specified message (without line break)

logfn(fmt)
Signature: fmt:StringFormat<'a,unit> -> 'a
Type parameters: 'a

Logs the specified message

logVerbosefn(fmt)
Signature: fmt:StringFormat<'a,unit> -> 'a
Type parameters: 'a

Logs the specified string if the verbose mode is activated.

openTag(tag)
Signature: tag:string -> unit

Puts an opening tag on the internal tag stack

trace(message)
Signature: message:string -> unit

Writes a trace to the command line (in green)

traceEndBuild()
Signature: unit -> unit

Traces the end of the build

traceEndTarget(name)
Signature: name:string -> unit

Traces the end of a target

traceEndTask task description
Signature: task:string -> description:string -> unit
Attributes:
[<Obsolete("use 'traceStartTaskUsing' with the 'use' pattern instead of traceStartTask / traceEndTask")>]
OBSOLETE

use 'traceStartTaskUsing' with the 'use' pattern instead of traceStartTask / traceEndTask

Traces the end of a task

TraceEnvironmentVariables()
Signature: unit -> unit

Traces the EnvironmentVariables

traceError(error)
Signature: error:string -> unit

Traces an error (in red)

traceException(ex)
Signature: ex:Exception -> unit

Traces an exception details (in red)

tracef(fmt)
Signature: fmt:StringFormat<'a,unit> -> 'a
Type parameters: 'a

Writes a message to the command line (in green) and without a line break

traceFAKE(fmt)
Signature: fmt:StringFormat<'a,unit> -> 'a
Type parameters: 'a

Writes a trace to the command line (in yellow)

tracefn(fmt)
Signature: fmt:StringFormat<'a,unit> -> 'a
Type parameters: 'a

Writes a message to the command line (in green)

traceHeader(name)
Signature: name:string -> unit

Traces a header

traceImportant(text)
Signature: text:string -> unit

Writes a trace to stderr (in yellow)

traceLine()
Signature: unit -> unit

Traces a line

traceStartBuild()
Signature: unit -> unit

Traces the begin of the build

traceStartTarget(...)
Signature: name:string -> description:string -> dependencyString:string -> unit

Traces the begin of a target

traceStartTask task description
Signature: task:string -> description:string -> unit
Attributes:
[<Obsolete("use 'traceStartTaskUsing' with the 'use' pattern instead of traceStartTask / traceEndTask")>]
OBSOLETE

use 'traceStartTaskUsing' with the 'use' pattern instead of traceStartTask / traceEndTask

Traces the begin of a task

traceStartTaskUsing task description
Signature: task:string -> description:string -> IDisposable

Traces the begin of a task and closes it again after disposing of the return value (call it with 'use')

traceVerbose(s)
Signature: s:string -> unit

Writes a trace to the command line (in green) if the verbose mode is activated.