10 static TextWriter console
= Console
.Out
;
11 static TextWriter file
= null;
13 static private void Write (string prefix
, string format
, params object [] args
)
15 StringBuilder builder
;
16 builder
= new StringBuilder ();
17 builder
.AppendFormat ("{0:yyMMdd HHmmssffff} ", DateTime
.Now
);
18 builder
.Append (prefix
);
20 builder
.AppendFormat (format
, args
);
23 message
= builder
.ToString ();
26 console
.WriteLine (message
);
29 file
.WriteLine (message
);
34 static public void Create (string path
)
36 file
= new StreamWriter (path
);
39 static public void Spew (string format
, params object [] args
)
41 Write ("---", format
, args
);
44 static public void Info (string format
, params object [] args
)
46 Write ("+++", format
, args
);
49 static public void Failure (string format
, params object [] args
)
51 Write ("***", format
, args
);