Trace

This module contains function which allow to trace build output

Nested types and modules

TypeDescription
EventLogEntryType
FAKEException
ISafeDisposable

Functions and values

Function or valueDescription
Trace.closeAllOpenTags()
Signature: unit -> unit
Trace.closeTag(tag)
Signature: tag:KnownTags -> unit
Attributes:
[<Obsolete("Consider using traceTag instead and 'use' to properly call closeTag in case of exceptions. To remove this warning use 'closeTagUnsafe'.")>]
OBSOLETE

Consider using traceTag instead and 'use' to properly call closeTag in case of exceptions. To remove this warning use 'closeTagUnsafe'.

Removes an opening tag from the internal tag stack

Trace.closeTagUnsafe(tag)
Signature: tag:KnownTags -> unit
Trace.closeTagUnsafeEx status tag
Signature: status:TagStatus -> tag:KnownTags -> unit

Removes an opening tag from the internal tag stack

Trace.exceptionAndInnersToString(ex)
Signature: ex:Exception -> string

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

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

Logs the specified string

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

Logs the specified message (without line break)

Trace.logfn(fmt)
Signature: fmt:StringFormat<'?9785,unit> -> '?9785
Type parameters: '?9785

Logs the specified message

Trace.logItems message items
Signature: message:string -> items:seq<string> -> unit

Logs the given files with the message.

Trace.logToConsole(msg, eventLogEntry)
Signature: (msg:string * eventLogEntry:EventLogEntryType) -> unit

Traces the message to the console

Trace.logVerbosefn(fmt)
Signature: fmt:StringFormat<'?9789,unit> -> '?9789
Type parameters: '?9789

Logs the specified string if the verbose mode is activated.

Trace.openTag tag description
Signature: tag:KnownTags -> description:string -> unit
Attributes:
[<Obsolete("Consider using traceTag instead and 'use' to properly call closeTag in case of exceptions. To remove this warning use 'openTagUnsafe'.")>]
OBSOLETE

Consider using traceTag instead and 'use' to properly call closeTag in case of exceptions. To remove this warning use 'openTagUnsafe'.

Puts an opening tag on the internal tag stack

Trace.openTagUnsafe tag description
Signature: tag:KnownTags -> description:string -> unit

Puts an opening tag on the internal tag stack

Trace.publish typ path
Signature: typ:ImportData -> path:string -> unit
Trace.setBuildNumber(number)
Signature: number:string -> unit
Trace.setBuildState(tag)
Signature: tag:TagStatus -> unit
Trace.setBuildStateWithMessage(...)
Signature: tag:TagStatus -> message:string -> unit
Trace.testOutput testName out err
Signature: testName:string -> out:string -> err:string -> unit
Trace.testStatus testName testStatus
Signature: testName:string -> testStatus:TestStatus -> unit
Trace.trace(message)
Signature: message:string -> unit

Writes a trace to the command line (in green)

Trace.traceEndFailureTargetUnsafeEx(...)
Signature: state:TagStatus -> name:string -> unit

Traces the end of a failure target

Trace.traceEndFinalTargetUnsafeEx(...)
Signature: state:TagStatus -> name:string -> unit

Traces the end of a final target

Trace.traceEndTarget(name)
Signature: name:string -> unit
Attributes:
[<Obsolete("Consider using traceTarget instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceEndTargetUnsafe'.")>]
OBSOLETE

Consider using traceTarget instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceEndTargetUnsafe'.

Traces the end of a target

Trace.traceEndTargetUnsafe(name)
Signature: name:string -> unit

Traces the end of a target

Trace.traceEndTargetUnsafeEx state name
Signature: state:TagStatus -> name:string -> unit

Traces the end of a target

Trace.traceEndTask(task)
Signature: task:string -> unit
Attributes:
[<Obsolete("Consider using traceTask instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceEndTask'.")>]
OBSOLETE

Consider using traceTask instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceEndTask'.

Traces the end of a task

Trace.traceEndTaskUnsafe(task)
Signature: task:string -> unit

Traces the end of a task

Trace.traceEndTaskUnsafeEx state task
Signature: state:TagStatus -> task:string -> unit

Traces the end of a task

Trace.traceEnvironmentVariables()
Signature: unit -> unit

Traces the EnvironmentVariables

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

Traces an error (in red)

Trace.traceErrorfn(fmt)
Signature: fmt:StringFormat<'?9803,unit> -> '?9803
Type parameters: '?9803

Writes an error message to stderr (in red)

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

Traces an exception details (in red)

Trace.tracef(fmt)
Signature: fmt:StringFormat<'?9794,unit> -> '?9794
Type parameters: '?9794

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

Trace.traceFailureTarget(...)
Signature: name:string -> description:string -> dependencyString:string -> ISafeDisposable
Trace.traceFAKE(fmt)
Signature: fmt:StringFormat<'?9800,unit> -> '?9800
Type parameters: '?9800

Writes a trace to the command line (in yellow)

Trace.traceFinalTarget(...)
Signature: name:string -> description:string -> dependencyString:string -> ISafeDisposable
Trace.tracefn(fmt)
Signature: fmt:StringFormat<'?9792,unit> -> '?9792
Type parameters: '?9792

Writes a message to the command line (in green)

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

Traces a header

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

Writes a trace to stderr (in yellow)

Trace.traceImportantfn(fmt)
Signature: fmt:StringFormat<'?9798,unit> -> '?9798
Type parameters: '?9798

Writes a message to stderr (in yellow)

Trace.traceLine()
Signature: unit -> unit

Traces a line

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

Traces the begin of a failure target

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

Traces the begin of a final target

Trace.traceStartTarget(...)
Signature: name:string -> description:string -> dependencyString:string -> unit
Attributes:
[<Obsolete("Consider using traceTarget instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceStartTargetUnsafe'.")>]
OBSOLETE

Consider using traceTarget instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceStartTargetUnsafe'.

Traces the begin of a target

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

Traces the begin of a target

Trace.traceStartTask task description
Signature: task:string -> description:string -> unit
Attributes:
[<Obsolete("Consider using traceTask instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceStartTaskUnsafe'.")>]
OBSOLETE

Consider using traceTask instead and 'use' to properly call traceEndTask in case of exceptions. To remove this warning use 'traceStartTaskUnsafe'.

Traces the begin of a task

Trace.traceStartTaskUnsafe(...)
Signature: task:string -> description:string -> unit

Traces the begin of a task

Trace.traceTag tag description
Signature: tag:KnownTags -> description:string -> ISafeDisposable
Trace.traceTarget(...)
Signature: name:string -> description:string -> dependencyString:string -> ISafeDisposable
Trace.traceTask name description
Signature: name:string -> description:string -> ISafeDisposable

Wrap functions in a 'use' of this function

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

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

Trace.useWith(...)
Signature: automaticSuccess:bool -> func:(ISafeDisposable -> '?9844) -> trace:ISafeDisposable -> '?9844
Type parameters: '?9844

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