anchor.diff:  ﻿[<AutoOpen>]
  +/// Defines default listeners for build output traces
   module Fake.TraceListener
   
   open System
   
   /// Defines Tracing information for TraceListeners
   type TraceData =
  -    | StartMessage
  -    | ImportantMessage of string
  -    | ErrorMessage  of string
  -    | LogMessage of string * bool
  -    | TraceMessage of string * bool
  -    | FinishedMessage 
  -    | OpenTag of string * string
  -    | CloseTag of string
  +| StartMessage
  +| ImportantMessage of string
  +| ErrorMessage  of string
  +| LogMessage of string * bool
  +| TraceMessage of string * bool
  +| FinishedMessage 
  +| OpenTag of string * string
  +| CloseTag of string
   
   /// Defines a TraceListener interface
   type ITraceListener =
       abstract Write: TraceData -> unit
   
  -/// Maps TracePriorities to ConsoleColors
  -let colorMap = function
  +/// A default color map which maps TracePriorities to ConsoleColors
  +let colorMap traceData = 
  +    match traceData with
       | ImportantMessage _ -> ConsoleColor.Yellow
       | ErrorMessage _     -> ConsoleColor.Red
       | LogMessage _       -> ConsoleColor.Gray
  
positive.code: /// The default TraceListener for Console
  let defaultConsoleTraceListener = ConsoleTraceListener(buildServer <> CCNet,colorMap)
  
  let mutable AutoCloseXmlWriter = false
  
  /// <summary>Implements a TraceListener which writes NAnt like XML files.</summary>
  /// <param name="xmlOutputFile">Defines the xml output file.</param>
  type NAntXmlTraceListener(xmlOutputFile) =
      let getXmlWriter() = new IO.StreamWriter(xmlOutputFile,true,encoding)
      let mutable xmlWriter:IO.StreamWriter = null
  
negative.code:     | FinishedMessage    -> ConsoleColor.White
      | _                  -> ConsoleColor.Gray
  
  /// Implements a TraceListener for System.Console
  /// ## Parameters
  ///  - `importantMessagesToStdErr` - Defines whether to trace important messages to StdErr.
  ///  - `colorMap` - A function which maps TracePriorities to ConsoleColors.
  type ConsoleTraceListener(importantMessagesToStdErr,colorMap) =
      let writeText toStdErr color newLine text =
          let curColor = Console.ForegroundColor
  