Skip to content

Commit

Permalink
Merge pull request #1986 from BlythMeister/logging
Browse files Browse the repository at this point in the history
Add traceImportant and traceError with formats
  • Loading branch information
matthid authored Jun 9, 2018
2 parents 86bd3e1 + b5a06dc commit 2e89b23
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 2e89b23

Please sign in to comment.