From da3a46be4bc41fbab3cd33baa52a12b34c05d000 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Thu, 7 Jun 2018 16:21:09 +0100 Subject: [PATCH 1/2] Add traceImportant and traceError with formats --- src/app/Fake.Core.Trace/Trace.fs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/Fake.Core.Trace/Trace.fs b/src/app/Fake.Core.Trace/Trace.fs index 7d0936bbe7a..0a26e1cd295 100644 --- a/src/app/Fake.Core.Trace/Trace.fs +++ b/src/app/Fake.Core.Trace/Trace.fs @@ -44,12 +44,24 @@ 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 message to stderr (in yellow) and without a line break +let traceImportantf fmt = Printf.ksprintf (fun text -> CoreTracing.postMessage (TraceData.ImportantMessage(text))) 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 + +/// Writes an error message to stderr (in red) and without a line break +let traceErrorf fmt = Printf.ksprintf (fun text -> CoreTracing.postMessage (TraceData.ErrorMessage(text))) fmt + open Microsoft.FSharp.Core.Printf /// Converts an exception and its inner exceptions to a nice string. From b5a06dcc7a5db2540837de4a3a4c5d32a9ba6b27 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Thu, 7 Jun 2018 19:08:12 +0100 Subject: [PATCH 2/2] Remove f format on error and important --- src/app/Fake.Core.Trace/Trace.fs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/app/Fake.Core.Trace/Trace.fs b/src/app/Fake.Core.Trace/Trace.fs index 0a26e1cd295..6c1855503e6 100644 --- a/src/app/Fake.Core.Trace/Trace.fs +++ b/src/app/Fake.Core.Trace/Trace.fs @@ -47,9 +47,6 @@ let traceImportant text = CoreTracing.postMessage (TraceData.ImportantMessage te /// Writes a message to stderr (in yellow) let traceImportantfn fmt = Printf.ksprintf traceImportant fmt -/// Writes a message to stderr (in yellow) and without a line break -let traceImportantf fmt = Printf.ksprintf (fun text -> CoreTracing.postMessage (TraceData.ImportantMessage(text))) fmt - /// Writes a trace to the command line (in yellow) let traceFAKE fmt = Printf.ksprintf (TraceData.ImportantMessage >> CoreTracing.postMessage) fmt @@ -59,9 +56,6 @@ let traceError error = CoreTracing.postMessage (TraceData.ErrorMessage error) /// Writes an error message to stderr (in red) let traceErrorfn fmt = Printf.ksprintf traceError fmt -/// Writes an error message to stderr (in red) and without a line break -let traceErrorf fmt = Printf.ksprintf (fun text -> CoreTracing.postMessage (TraceData.ErrorMessage(text))) fmt - open Microsoft.FSharp.Core.Printf /// Converts an exception and its inner exceptions to a nice string.