FAKE - F# Make - A DSL for build tasks and more FAKE
6.1.3

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Trace Module

This module contains function which allow to trace build output

Types

Type Description

EventLogEntryType

FAKEException

Define a FAKE exception type

ISafeDisposable

A safe disposable type for tracing

Functions and values

Function or value Description

Trace.closeAllOpenTags ()

Full Usage: Trace.closeAllOpenTags ()

Parameters:
    () : unit

Closes all opened tags

() : unit

Trace.closeTagUnsafe tag

Full Usage: Trace.closeTagUnsafe tag

Parameters:

Removes an opening tag from the internal tag stack

tag : KnownTags

The tag to insert

Trace.closeTagUnsafeEx status tag

Full Usage: Trace.closeTagUnsafeEx status tag

Parameters:

Removes an opening tag from the internal tag stack

status : TagStatus
tag : KnownTags

The tag to close

Trace.exceptionAndInnersToString ex

Full Usage: Trace.exceptionAndInnersToString ex

Parameters:
Returns: string

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

ex : Exception

The exception to convert

Returns: string

Trace.isVerbose printHint

Full Usage: Trace.isVerbose printHint

Parameters:
    printHint : bool - Flag to mark if a hint will be written to log for verbosity

Returns: bool

Checks if FAKE is running in verbose mode

printHint : bool

Flag to mark if a hint will be written to log for verbosity

Returns: bool

Trace.log message

Full Usage: Trace.log message

Parameters:
    message : string - The message to log

Logs the specified string

message : string

The message to log

Trace.logItems message items

Full Usage: Trace.logItems message items

Parameters:
    message : string - The message to log
    items : seq<string> - The files to log message to

Logs the given files with the message.

message : string

The message to log

items : seq<string>

The files to log message to

Trace.logToConsole (msg, eventLogEntry)

Full Usage: Trace.logToConsole (msg, eventLogEntry)

Parameters:
    msg : string - The message to log
    eventLogEntry : EventLogEntryType - The message log level

Traces the message to the console

msg : string

The message to log

eventLogEntry : EventLogEntryType

The message log level

Trace.logVerbosefn fmt

Full Usage: Trace.logVerbosefn fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to log

Returns: 'a

Logs the specified string if the verbose mode is activated.

fmt : StringFormat<'a, unit>

The formatted message to log

Returns: 'a

Trace.logf fmt

Full Usage: Trace.logf fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to log

Returns: 'a

Logs the specified message (without line break)

fmt : StringFormat<'a, unit>

The formatted message to log

Returns: 'a

Trace.logfn fmt

Full Usage: Trace.logfn fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to log

Returns: 'a

Logs the specified message

fmt : StringFormat<'a, unit>

The formatted message to log

Returns: 'a

Trace.openTagUnsafe tag description

Full Usage: Trace.openTagUnsafe tag description

Parameters:
    tag : KnownTags - The tag to insert
    description : string - The tag description

Puts an opening tag on the internal tag stack

tag : KnownTags

The tag to insert

description : string

The tag description

Trace.publish typ path

Full Usage: Trace.publish typ path

Parameters:
    typ : ImportData - The type to publish
    path : string - The path to publish type to

Publish given type in given path

typ : ImportData

The type to publish

path : string

The path to publish type to

Trace.setBuildNumber number

Full Usage: Trace.setBuildNumber number

Parameters:
    number : string - The build number to trace

Trace the given build number

number : string

The build number to trace

Trace.setBuildState tag

Full Usage: Trace.setBuildState tag

Parameters:

Set build state with the given tag

tag : TagStatus

The tag to trace

Trace.setBuildStateWithMessage tag message

Full Usage: Trace.setBuildStateWithMessage tag message

Parameters:
    tag : TagStatus - The tag to trace
    message : string - the build message

Set build state with the given tag and message

tag : TagStatus

The tag to trace

message : string

the build message

Trace.setVerbose ()

Full Usage: Trace.setVerbose ()

Parameters:
    () : unit

() : unit

Trace.testOutput testName out err

Full Usage: Trace.testOutput testName out err

Parameters:
    testName : string - The test name
    out : string - The test output
    err : string - The test error

Trace test output and errors

testName : string

The test name

out : string

The test output

err : string

The test error

Trace.testStatus testName testStatus

Full Usage: Trace.testStatus testName testStatus

Parameters:
    testName : string - The test name
    testStatus : TestStatus - The test status

Set status for the given test

testName : string

The test name

testStatus : TestStatus

The test status

Trace.trace message

Full Usage: Trace.trace message

Parameters:
    message : string - The message to log

Writes a trace to the command line (in green)

message : string

The message to log

Trace.traceEndFailureTargetUnsafeEx state name

Full Usage: Trace.traceEndFailureTargetUnsafeEx state name

Parameters:
    state : TagStatus - The target state
    name : string - The name of the target

Traces the end of a failure target

state : TagStatus

The target state

name : string

The name of the target

Trace.traceEndFinalTargetUnsafeEx state name

Full Usage: Trace.traceEndFinalTargetUnsafeEx state name

Parameters:
    state : TagStatus - The target state
    name : string - The name of the target

Traces the end of a final target

state : TagStatus

The target state

name : string

The name of the target

Trace.traceEndTargetUnsafe name

Full Usage: Trace.traceEndTargetUnsafe name

Parameters:
    name : string - The name of the target

Traces the end of a target

name : string

The name of the target

Trace.traceEndTargetUnsafeEx state name

Full Usage: Trace.traceEndTargetUnsafeEx state name

Parameters:
    state : TagStatus - The target state
    name : string - The name of the target

Traces the end of a target

state : TagStatus

The target state

name : string

The name of the target

Trace.traceEndTaskUnsafe task

Full Usage: Trace.traceEndTaskUnsafe task

Parameters:
    task : string - The name of the task

Traces the end of a task

task : string

The name of the task

Trace.traceEndTaskUnsafeEx state task

Full Usage: Trace.traceEndTaskUnsafeEx state task

Parameters:
    state : TagStatus - The state of the task
    task : string - The name of the task

Traces the end of a task

state : TagStatus

The state of the task

task : string

The name of the task

Trace.traceEnvironmentVariables ()

Full Usage: Trace.traceEnvironmentVariables ()

Parameters:
    () : unit

Traces the EnvironmentVariables

() : unit

Trace.traceError error

Full Usage: Trace.traceError error

Parameters:
    error : string - The error message to trace

Traces an error (in red)

error : string

The error message to trace

Trace.traceErrorfn fmt

Full Usage: Trace.traceErrorfn fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted error message to trace

Returns: 'a

Writes an error message to stderr (in red)

fmt : StringFormat<'a, unit>

The formatted error message to trace

Returns: 'a

Trace.traceException ex

Full Usage: Trace.traceException ex

Parameters:

Traces an exception details (in red)

ex : Exception

The exception to trace

Trace.traceFAKE fmt

Full Usage: Trace.traceFAKE fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to trace

Returns: 'a

Writes a trace to the command line (in yellow)

fmt : StringFormat<'a, unit>

The formatted message to trace

Returns: 'a

Trace.traceFailureTarget name description dependencyString

Full Usage: Trace.traceFailureTarget name description dependencyString

Parameters:
    name : string - The name of the target
    description : string - The description of the target
    dependencyString : string - The target dependency string

Returns: ISafeDisposable

Traces a failed target

name : string

The name of the target

description : string

The description of the target

dependencyString : string

The target dependency string

Returns: ISafeDisposable

Trace.traceFinalTarget name description dependencyString

Full Usage: Trace.traceFinalTarget name description dependencyString

Parameters:
    name : string - The name of the target
    description : string - The description of the target
    dependencyString : string - The target dependency string

Returns: ISafeDisposable

Traces a final target

name : string

The name of the target

description : string

The description of the target

dependencyString : string

The target dependency string

Returns: ISafeDisposable

Trace.traceHeader name

Full Usage: Trace.traceHeader name

Parameters:
    name : string - The header value

Traces a header

name : string

The header value

Trace.traceImportant text

Full Usage: Trace.traceImportant text

Parameters:
    text : string - The text to trace

Writes a trace to stderr (in yellow)

text : string

The text to trace

Trace.traceImportantfn fmt

Full Usage: Trace.traceImportantfn fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to trace

Returns: 'a

Writes a message to stderr (in yellow)

fmt : StringFormat<'a, unit>

The formatted message to trace

Returns: 'a

Trace.traceLine ()

Full Usage: Trace.traceLine ()

Parameters:
    () : unit

Traces a line

() : unit

Trace.traceStartFailureTargetUnsafe name description dependencyString

Full Usage: Trace.traceStartFailureTargetUnsafe name description dependencyString

Parameters:
    name : string - The name of the target
    description : string - The description of the target
    dependencyString : string - The target dependency string

Traces the begin of a failure target

name : string

The name of the target

description : string

The description of the target

dependencyString : string

The target dependency string

Trace.traceStartFinalTargetUnsafe name description dependencyString

Full Usage: Trace.traceStartFinalTargetUnsafe name description dependencyString

Parameters:
    name : string - The name of the target
    description : string - The description of the target
    dependencyString : string - The target dependency string

Traces the begin of a final target

name : string

The name of the target

description : string

The description of the target

dependencyString : string

The target dependency string

Trace.traceStartTargetUnsafe name description dependencyString

Full Usage: Trace.traceStartTargetUnsafe name description dependencyString

Parameters:
    name : string - The name of the target
    description : string - The description of the target
    dependencyString : string - The target dependency string

Traces the begin of a target

name : string

The name of the target

description : string

The description of the target

dependencyString : string

The target dependency string

Trace.traceStartTaskUnsafe task description

Full Usage: Trace.traceStartTaskUnsafe task description

Parameters:
    task : string - The name of the task
    description : string - The description of the task

Traces the begin of a task

task : string

The name of the task

description : string

The description of the task

Trace.traceTag tag description

Full Usage: Trace.traceTag tag description

Parameters:
    tag : KnownTags - The tag to trace
    description : string - the tag description

Returns: ISafeDisposable

Traces a tag

tag : KnownTags

The tag to trace

description : string

the tag description

Returns: ISafeDisposable

Trace.traceTarget name description dependencyString

Full Usage: Trace.traceTarget name description dependencyString

Parameters:
    name : string - The name of the target
    description : string - The description of the target
    dependencyString : string - The target dependency string

Returns: ISafeDisposable

Traces a target

name : string

The name of the target

description : string

The description of the target

dependencyString : string

The target dependency string

Returns: ISafeDisposable

Trace.traceTask name description

Full Usage: Trace.traceTask name description

Parameters:
    name : string - The name of the task
    description : string - The description of the task

Returns: ISafeDisposable

Wrap functions in a 'use' of this function

name : string

The name of the task

description : string

The description of the task

Returns: ISafeDisposable

Trace.traceVerbose s

Full Usage: Trace.traceVerbose s

Parameters:
    s : string - The message to trace

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

s : string

The message to trace

Trace.tracef fmt

Full Usage: Trace.tracef fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to log

Returns: 'a

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

fmt : StringFormat<'a, unit>

The formatted message to log

Returns: 'a

Trace.tracefn fmt

Full Usage: Trace.tracefn fmt

Parameters:
    fmt : StringFormat<'a, unit> - The formatted message to log

Returns: 'a

Writes a message to the command line (in green)

fmt : StringFormat<'a, unit>

The formatted message to log

Returns: 'a

Trace.useWith automaticSuccess func trace

Full Usage: Trace.useWith automaticSuccess func trace

Parameters:
    automaticSuccess : bool - Flag to mark trace task as success
    func : ISafeDisposable -> 'a - Callback to call on result of task trace
    trace : ISafeDisposable - The trace instance

Returns: 'a
Modifiers: inline

Allows automatic or manual tracing around a function being run If in automatic success mode and no exception is thrown then trace is marked as success Any exception thrown will result in a mark failed and exception re-thrown

automaticSuccess : bool

Flag to mark trace task as success

func : ISafeDisposable -> 'a

Callback to call on result of task trace

trace : ISafeDisposable

The trace instance

Returns: 'a