diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2002-10-26 19:26:35 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2002-10-26 19:26:35 +0400 |
commit | 7f080f3193ac80ac325ae1cb6e3c3be04540edcc (patch) | |
tree | f640d56a0fc0e7bf977dbfcf6735f9f66247dabf /mcs/class/System/System.Diagnostics | |
parent | 954165409b7e2cc5932e438fa304a9e14d60b5eb (diff) |
2002-10-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* DefaultTraceListener.cs: changed OutputDebugString to
OutputDebugStringW (no more warnings under windows). Also a few style
fixes.
svn path=/trunk/mcs/; revision=8580
Diffstat (limited to 'mcs/class/System/System.Diagnostics')
-rw-r--r-- | mcs/class/System/System.Diagnostics/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System/System.Diagnostics/DefaultTraceListener.cs | 30 |
2 files changed, 21 insertions, 15 deletions
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog index 89b7c236d99..69356c22be4 100644 --- a/mcs/class/System/System.Diagnostics/ChangeLog +++ b/mcs/class/System/System.Diagnostics/ChangeLog @@ -1,3 +1,9 @@ +2002-10-26 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * DefaultTraceListener.cs: changed OutputDebugString to + OutputDebugStringW (no more warnings under windows). Also a few style + fixes. + 2002-10-23 Dick Porter <dick@ximian.com> * Process.cs: Redirected standard input needs to have AutoFlush set diff --git a/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs b/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs index d13d0aae8ef..fd0a8597b5c 100644 --- a/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs +++ b/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs @@ -121,25 +121,25 @@ namespace System.Diagnostics { set {logFileName = value;} } - public override void Fail (string message) - { - base.Fail (message); - WriteLine (new StackTrace().ToString()); - } - - public override void Fail (string message, string detailMessage) - { - base.Fail (message, detailMessage); - WriteLine (new StackTrace().ToString()); - } + public override void Fail (string message) + { + base.Fail (message); + WriteLine (new StackTrace().ToString()); + } + + public override void Fail (string message, string detailMessage) + { + base.Fail (message, detailMessage); + WriteLine (new StackTrace().ToString()); + } [DllImport ("kernel32.dll", CharSet=CharSet.Auto)] - private extern static void OutputDebugString (string message); + private extern static void OutputDebugStringW (string message); private void WriteDebugString (string message) { if (OnWin32) - OutputDebugString (message); + OutputDebugStringW (message); else WriteMonoTrace (message); } @@ -171,7 +171,7 @@ namespace System.Diagnostics { if (NeedIndent) { WriteIndent (); WritePrefix (); - } + } WriteDebugString (message); @@ -203,7 +203,7 @@ namespace System.Diagnostics { using (sw) { sw.Write (message); - sw.Flush (); + sw.Flush (); } } } |