Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add traceImportant and traceError with formats #1986

Merged
merged 2 commits into from
Jun 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app/Fake.Core.Trace/Trace.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ let traceVerbose s =
/// Writes a trace to stderr (in yellow)
let traceImportant text = CoreTracing.postMessage (TraceData.ImportantMessage text)

/// Writes a message to stderr (in yellow)
let traceImportantfn fmt = Printf.ksprintf traceImportant fmt

/// Writes a trace to the command line (in yellow)
let traceFAKE fmt = Printf.ksprintf (TraceData.ImportantMessage >> CoreTracing.postMessage) fmt

/// Traces an error (in red)
let traceError error = CoreTracing.postMessage (TraceData.ErrorMessage error)

/// Writes an error message to stderr (in red)
let traceErrorfn fmt = Printf.ksprintf traceError fmt

open Microsoft.FSharp.Core.Printf

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