changeset 18:735224fcc45f

redirected all printings to DwtLogger
author Frank Benoit <benoit@tionex.de>
date Wed, 18 Mar 2009 09:57:53 +0100
parents 6f068362a363
children 52184e4b815c
files java/src/java/lang/util.d java/src/java/util/ResourceBundle.d java/src/java/util/zip/InflaterInputStream.d org.eclipse.core.commands/src/org/eclipse/core/commands/Command.d org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/DeadlockDetector.d org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.d org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.d org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobMessages.d org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.d org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.d org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.d org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.d org.eclipse.jface/src/org/eclipse/jface/action/ContributionManager.d org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.d org.eclipse.jface/src/org/eclipse/jface/action/ToolBarContributionItem.d org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.d org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.d org.eclipse.jface/src/org/eclipse/jface/fieldassist/FieldAssistColors.d org.eclipse.jface/src/org/eclipse/jface/operation/ModalContext.d org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.d org.eclipse.jface/src/org/eclipse/jface/util/Policy.d org.eclipse.jface/src/org/eclipse/jface/window/Window.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTError.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTException.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/graphics/Device.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/gdip/native.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Widget.d org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.d
diffstat 30 files changed, 157 insertions(+), 139 deletions(-) [+]
line wrap: on
line diff
--- a/java/src/java/lang/util.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/java/src/java/lang/util.d	Wed Mar 18 09:57:53 2009 +0100
@@ -25,8 +25,63 @@
 import tango.util.log.Trace;
 import tango.util.log.Log;
 import tango.text.UnicodeData;
-Logger getDwtLogger(){
-    return Log.lookup( "org.eclipse.swt" );
+
+interface IDwtLogger {
+    void trace( String file, ulong line, String fmt, ... );
+    void info( String file, ulong line, String fmt, ... );
+    void warn( String file, ulong line, String fmt, ... );
+    void error( String file, ulong line, String fmt, ... );
+    void fatal( String file, ulong line, String fmt, ... );
+}
+
+class DwtLogger : IDwtLogger {
+    Logger logger;
+    private this( char[] name ){
+        logger = Log.lookup( name );
+    }
+    private char[] format( String file, ulong line, String fmt, TypeInfo[] types, void* argptr ){
+        auto msg = Format.convert( types, argptr, fmt );
+        auto text = Format( "{} {}: {}", file, line, msg );
+        return text;
+    }
+    void trace( String file, ulong line, String fmt, ... ){
+        if( logger.trace ){
+            logger.trace( format( file, line, fmt, _arguments, _argptr ));
+        }
+    }
+    void info( String file, ulong line, String fmt, ... ){
+        if( logger.info ){
+            logger.info( format( file, line, fmt, _arguments, _argptr ));
+        }
+    }
+    void warn( String file, ulong line, String fmt, ... ){
+        if( logger.warn ){
+            logger.warn( format( file, line, fmt, _arguments, _argptr ));
+        }
+    }
+    void error( String file, ulong line, String fmt, ... ){
+        if( logger.error ){
+            logger.error( format( file, line, fmt, _arguments, _argptr ));
+        }
+    }
+    void fatal( String file, ulong line, String fmt, ... ){
+        if( logger.fatal ){
+            logger.fatal( format( file, line, fmt, _arguments, _argptr ));
+        }
+    }
+}
+
+private DwtLogger dwtLoggerInstance;
+
+IDwtLogger getDwtLogger(){
+    if( dwtLoggerInstance is null ){
+        synchronized{
+            if( dwtLoggerInstance is null ){
+                dwtLoggerInstance = new DwtLogger( "dwt" );
+            }
+        }
+    }
+    return dwtLoggerInstance;
 }
 
 public alias tango.text.convert.Format.Format Format;
@@ -732,17 +787,17 @@
 
 /// Extension to the D Exception
 void ExceptionPrintStackTrace( Exception e ){
-    ExceptionPrintStackTrace( e, Stderr );
+    ExceptionPrintStackTrace( e, & getDwtLogger().error );
 }
 
 /// Extension to the D Exception
-void ExceptionPrintStackTrace( Exception e, FormatOutput!(char) print ){
+void ExceptionPrintStackTrace( Exception e, void delegate ( String file, ulong line, String fmt, ... ) dg ){
     Exception exception = e;
     while( exception !is null ){
-        print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg );
+        dg( exception.file, exception.line, "Exception in {}({}): {}", exception.file, exception.line, exception.msg );
         if( exception.info !is null ){
             foreach( msg; exception.info ){
-                print.formatln( "trc {}", msg );
+                dg( exception.file, exception.line, "trc {}", msg );
             }
         }
         exception = exception.next;
--- a/java/src/java/util/ResourceBundle.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/java/src/java/util/ResourceBundle.d	Wed Mar 18 09:57:53 2009 +0100
@@ -4,7 +4,6 @@
 module java.util.ResourceBundle;
 
 import tango.text.Util;
-import tango.io.Stdout;
 
 import java.lang.util;
 import java.lang.Integer;
@@ -54,7 +53,6 @@
         String line;
         int dataIndex;
 
-        //tango.io.Stdout.Stdout.formatln( "properties put ..." );
         void readLine(){
             line.length = 0;
             char i = data[ dataIndex++ ];
@@ -64,22 +62,18 @@
             }
         }
 
-        //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ );
         bool linecontinue = false;
         bool iskeypart = true;
         String key;
         String value;
 nextline:
         while( dataIndex < data.length ){
-            //tango.io.Stdout.Stdout.formatln( "properties put {} startline", __LINE__ );
             readLine();
             line = java.lang.util.trim(line);
             if( line.length is 0 ){
-                //tango.io.Stdout.Stdout.formatln( "properties put {} was 0 length", __LINE__ );
                 continue;
             }
             if( line[0] == '#' ){
-                //tango.io.Stdout.Stdout.formatln( "properties put {} was comment", __LINE__ );
                 continue;
             }
             int pos = 0;
@@ -138,10 +132,8 @@
             }
             key = java.lang.util.trim(key);
             value = java.lang.util.trim(value);
-            //tango.io.Stdout.Stdout.formatln( "properties put {}=>{}", key, value );
 
             map[ key.dup ] = value.dup;
-            //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ );
         }
     }
 
--- a/java/src/java/util/zip/InflaterInputStream.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/java/src/java/util/zip/InflaterInputStream.d	Wed Mar 18 09:57:53 2009 +0100
@@ -5,7 +5,6 @@
 
 public import java.io.InputStream;
 import java.lang.all;
-import tango.io.Stdout;
 import tango.io.compress.ZlibStream;
 version(Windows){
     version(build){
--- a/org.eclipse.core.commands/src/org/eclipse/core/commands/Command.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.commands/src/org/eclipse/core/commands/Command.d	Wed Mar 18 09:57:53 2009 +0100
@@ -44,7 +44,6 @@
 import org.eclipse.core.commands.HandlerEvent;
 
 import java.lang.all;
-import tango.io.Stdout;
 
 /**
  * <p>
@@ -870,7 +869,7 @@
                 // provide information if tracing
                 Tracing.printTrace("HANDLERS", "Handler " ~ (cast(Object)handler).toString()  ~ " for "  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
                         ~ id ~ " threw unexpected exception"); //$NON-NLS-1$
-                ExceptionPrintStackTrace( e, Stdout );
+                ExceptionPrintStackTrace( e, & getDwtLogger().info );
             }
         }
         return false;
--- a/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/DeadlockDetector.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/DeadlockDetector.d	Wed Mar 18 09:57:53 2009 +0100
@@ -13,7 +13,6 @@
 module org.eclipse.core.internal.jobs.DeadlockDetector;
 
 import java.lang.JThread;
-import tango.io.Stdout;
 
 import java.lang.all;
 import java.util.ArrayList;
@@ -241,9 +240,9 @@
                 blocking.add(lockThreads.get(i));
         }
         if ((blocking.size() is 0) && (JobManager.DEBUG_LOCKS))
-            Stdout.formatln(Format("Lock {} is involved in deadlock but is not owned by any thread.", rule )); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "Lock {} is involved in deadlock but is not owned by any thread.", rule ); //$NON-NLS-1$ //$NON-NLS-2$
         if ((blocking.size() > 1) && (cast(ILock)rule ) && (JobManager.DEBUG_LOCKS))
-            Stdout.formatln(Format("Lock {} is owned by more than 1 thread, but it is not a rule.", rule )); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "Lock {} is owned by more than 1 thread, but it is not a rule.", rule ); //$NON-NLS-1$ //$NON-NLS-2$
         return arraycast!(JThread)( blocking.toArray());
     }
 
@@ -339,12 +338,12 @@
         //make sure the lock and thread exist in the graph
         if (threadIndex < 0) {
             if (JobManager.DEBUG_LOCKS)
-                Stdout.formatln("[lockReleased] Lock {} was already released by thread {}", lock, owner.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "[lockReleased] Lock {} was already released by thread {}", lock, owner.getName()); //$NON-NLS-1$ //$NON-NLS-2$
             return;
         }
         if (lockIndex < 0) {
             if (JobManager.DEBUG_LOCKS)
-                Stdout.formatln("[lockReleased] Thread {} already released lock {}", owner.getName(), lock); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "[lockReleased] Thread {} already released lock {}", owner.getName(), lock); //$NON-NLS-1$ //$NON-NLS-2$
             return;
         }
         //if this lock was suspended, set it to NO_STATE
@@ -358,7 +357,7 @@
             if ((lock.isConflicting(cast(ISchedulingRule) locks.get(j))) || (!(cast(ILock)lock ) && !(cast(ILock)locks.get(j)) && (graph[threadIndex][j] > NO_STATE))) {
                 if (graph[threadIndex][j] is NO_STATE) {
                     if (JobManager.DEBUG_LOCKS)
-                        Stdout.formatln("[lockReleased] More releases than acquires for thread {} and lock {}", owner.getName(), lock); //$NON-NLS-1$ //$NON-NLS-2$
+                        getDwtLogger.info( __FILE__, __LINE__, "[lockReleased] More releases than acquires for thread {} and lock {}", owner.getName(), lock); //$NON-NLS-1$ //$NON-NLS-2$
                 } else {
                     graph[threadIndex][j]--;
                 }
@@ -379,12 +378,12 @@
         //need to make sure that the given thread and rule were not already removed from the graph
         if (threadIndex < 0) {
             if (JobManager.DEBUG_LOCKS)
-                Stdout.formatln("[lockReleasedCompletely] Lock {} was already released by thread {}", rule, owner.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "[lockReleasedCompletely] Lock {} was already released by thread {}", rule, owner.getName()); //$NON-NLS-1$ //$NON-NLS-2$
             return;
         }
         if (ruleIndex < 0) {
             if (JobManager.DEBUG_LOCKS)
-                Stdout.formatln("[lockReleasedCompletely] Thread {} already released lock {}", owner.getName(), rule); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "[lockReleasedCompletely] Thread {} already released lock {}", owner.getName(), rule); //$NON-NLS-1$ //$NON-NLS-2$
             return;
         }
         /**
@@ -438,12 +437,12 @@
         //make sure the thread and lock exist in the graph
         if (threadIndex < 0) {
             if (JobManager.DEBUG_LOCKS)
-                Stdout.formatln("Thread {} was already removed.", owner.getName() ); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "Thread {} was already removed.", owner.getName() ); //$NON-NLS-1$ //$NON-NLS-2$
             return;
         }
         if (lockIndex < 0) {
             if (JobManager.DEBUG_LOCKS)
-                Stdout.formatln("Lock {} was already removed.", lock ); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "Lock {} was already removed.", lock ); //$NON-NLS-1$ //$NON-NLS-2$
             return;
         }
         if (graph[threadIndex][lockIndex] !is WAITING_FOR_LOCK)
--- a/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.d	Wed Mar 18 09:57:53 2009 +0100
@@ -13,7 +13,6 @@
 module org.eclipse.core.internal.jobs.ImplicitJobs;
 
 import java.lang.JThread;
-import tango.io.Stdout;
 import java.lang.all;
 import java.util.Iterator;
 import java.util.Map;
@@ -159,7 +158,7 @@
             RuntimeLog.log(error);
         } catch (RuntimeException e) {
             //failed to log, so print to console instead
-            Stderr.formatln("{}", error.getMessage());
+            getDwtLogger.error( __FILE__, __LINE__, "{}", error.getMessage());
         }
     }
 
--- a/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.d	Wed Mar 18 09:57:53 2009 +0100
@@ -19,7 +19,6 @@
 import java.util.Iterator;
 import java.util.Set;
 import java.util.HashSet;
-import tango.io.Stdout;
 import tango.time.WallClock;
 import tango.time.Time;
 import java.lang.JThread;
@@ -199,7 +198,7 @@
         msgBuf.append(JThread.currentThread().toString());
         msgBuf.append(']');
         msgBuf.append(msg);
-        Stdout.formatln( "{}", msgBuf.toString());
+        getDwtLogger.info( __FILE__, __LINE__, "{}", msgBuf.toString());
     }
 
     /**
@@ -594,7 +593,7 @@
                 // TODO the RuntimeLog.log in its current implementation won't produce a log
                 // during this stage of shutdown. For now add a standard error output.
                 // One the logging story is improved, the System.err output below can be removed:
-                Stderr.formatln("{}", msg);
+                getDwtLogger.error( __FILE__, __LINE__, "{}", msg);
             }
         }
 
--- a/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobMessages.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobMessages.d	Wed Mar 18 09:57:53 2009 +0100
@@ -12,7 +12,6 @@
 module org.eclipse.core.internal.jobs.JobMessages;
 
 import java.lang.JThread;
-import tango.io.Stdout;
 import tango.time.WallClock;
 import tango.text.convert.TimeStamp;
 
@@ -57,6 +56,6 @@
         buffer.append(JThread.currentThread().getName());
         buffer.append("] "); //$NON-NLS-1$
         buffer.append(message);
-        Stdout.formatln(buffer.toString());
+        getDwtLogger.info( __FILE__, __LINE__, buffer.toString());
     }
 }
--- a/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.d	Wed Mar 18 09:57:53 2009 +0100
@@ -13,7 +13,6 @@
 module org.eclipse.core.internal.jobs.OrderedLock;
 
 import java.lang.JThread;
-import tango.io.Stdout;
 import java.lang.all;
 import java.util.Set;
 
@@ -116,13 +115,13 @@
         if (semaphore is null)
             return true;
         if (DEBUG)
-            Stdout.formatln("[{}] Operation waiting to be executed... ", JThread.currentThread(), this); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "[{}] Operation waiting to be executed... ", JThread.currentThread(), this); //$NON-NLS-1$ //$NON-NLS-2$
         success = doAcquire(semaphore, delay);
         manager.resumeSuspendedLocks(JThread.currentThread());
         if (DEBUG && success)
-            Stdout.formatln("[{}] Operation started... ", JThread.currentThread(), this); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "[{}] Operation started... ", JThread.currentThread(), this); //$NON-NLS-1$ //$NON-NLS-2$
         else if (DEBUG)
-            Stdout.formatln("[{}] Operation timed out... ", JThread.currentThread(), this); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "[{}] Operation timed out... ", JThread.currentThread(), this); //$NON-NLS-1$ //$NON-NLS-2$
         return success;
     }
 
@@ -184,7 +183,7 @@
             success = semaphore.acquire(delay);
         } catch (InterruptedException e) {
             if (DEBUG)
-                Stdout.formatln(Format("[{}] Operation interrupted while waiting... :-|", JThread.currentThread())); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, Format("[{}] Operation interrupted while waiting... :-|", JThread.currentThread())); //$NON-NLS-1$ //$NON-NLS-2$
             throw e;
         }
         if (success) {
--- a/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.d	Wed Mar 18 09:57:53 2009 +0100
@@ -14,7 +14,6 @@
 
 import java.lang.all;
 import java.util.Set;
-import tango.io.Stdout;
 import java.lang.JThread;
 import tango.core.sync.Mutex;
 import tango.core.sync.Condition;
@@ -118,7 +117,7 @@
         buf.append(".  See log for trace information if rule tracing is enabled."); //$NON-NLS-1$
         String msg = buf.toString();
         if (JobManager.DEBUG || JobManager.DEBUG_BEGIN_END) {
-            Stdout.formatln("{}",msg);
+            getDwtLogger.info( __FILE__, __LINE__, "{}",msg);
             Exception t = lastPush is null ? cast(Exception)new IllegalArgumentException("") : cast(Exception)lastPush;
             IStatus error = new Status(IStatus.ERROR, JobManager.PI_JOBS, 1, msg, t);
             RuntimeLog.log(error);
@@ -137,7 +136,7 @@
         buf.append(Format("{}",baseRule));
         String msg = buf.toString();
         if (JobManager.DEBUG) {
-            Stdout.formatln("{}",msg);
+            getDwtLogger.info( __FILE__, __LINE__, "{}",msg);
             IStatus error = new Status(IStatus.ERROR, JobManager.PI_JOBS, 1, msg, new IllegalArgumentException(""));
             RuntimeLog.log(error);
         }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.d	Wed Mar 18 09:57:53 2009 +0100
@@ -18,7 +18,6 @@
 // import java.io.PrintWriter;
 
 import java.lang.all;
-import tango.io.Stdout;
 
 /**
  * A checked exception representing a failure.
@@ -85,17 +84,17 @@
      */
     public void printStackTrace() {
 //         printStackTrace(System.err);
-        Stderr.formatln( "Exception in File {}({}): {}", this.file, this.line, this.msg );
+        getDwtLogger.error( __FILE__, __LINE__, "Exception in File {}({}): {}", this.file, this.line, this.msg );
         foreach( msg; this.info ){
-            Stderr.formatln( "    trc: {}", msg );
+            getDwtLogger.error( __FILE__, __LINE__, "    trc: {}", msg );
         }
         if (status.getException() !is null) {
-            Stderr.formatln( "{}[{}]: ", this.classinfo.name, status.getCode() ); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.error( __FILE__, __LINE__, "{}[{}]: ", this.classinfo.name, status.getCode() ); //$NON-NLS-1$ //$NON-NLS-2$
 //             status.getException().printStackTrace();
                 auto e = status.getException();
-                Stderr.formatln( "Exception in File {}({}): {}", e.file, e.line, e.msg );
+                getDwtLogger.error( __FILE__, __LINE__, "Exception in File {}({}): {}", e.file, e.line, e.msg );
                 foreach( msg; e.info ){
-                    Stderr.formatln( "    trc: {}", msg );
+                    getDwtLogger.error( __FILE__, __LINE__, "    trc: {}", msg );
                 }
         }
     }
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.d	Wed Mar 18 09:57:53 2009 +0100
@@ -85,7 +85,6 @@
 import java.util.HashMap;
 import java.util.Set;
 import java.util.HashSet;
-import tango.io.Stdout;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.SWTException;
@@ -1205,7 +1204,7 @@
         } else {
             if (DEBUG && event !is null && event.isWorldChange()) {
                 System.out_.println("AP: WORLD CHANGED, stack trace follows:"); //$NON-NLS-1$
-                ExceptionPrintStackTrace( new Exception(""), Stdout );
+                ExceptionPrintStackTrace( new Exception(""), & getDwtLogger().info );
             }
 
             // XXX: posting here is a problem for annotations that are being
--- a/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.d	Wed Mar 18 09:57:53 2009 +0100
@@ -52,7 +52,6 @@
 import java.lang.all;
 import java.util.Set;
 import java.lang.JThread;
-import tango.io.Stdout;
 
 /**
  * A contribution item which delegates to an action.
@@ -578,7 +577,7 @@
                 long ms = 0L;
                 if (trace) {
                     ms = System.currentTimeMillis();
-                    Stdout.formatln("Running action: {}", action.getText()); //$NON-NLS-1$
+                    getDwtLogger.info( __FILE__, __LINE__, "Running action: {}", action.getText()); //$NON-NLS-1$
                 }
 
                 IPropertyChangeListener resultListener = null;
@@ -614,7 +613,7 @@
                     action.removePropertyChangeListener(resultListener);
                 }
                 if (trace) {
-                    Stdout.formatln("{} ms to run action: {}",(System.currentTimeMillis() - ms), action.getText()); //$NON-NLS-1$
+                    getDwtLogger.info( __FILE__, __LINE__, "{} ms to run action: {}",(System.currentTimeMillis() - ms), action.getText()); //$NON-NLS-1$
                 }
             } else {
                 if (callback !is null) {
--- a/org.eclipse.jface/src/org/eclipse/jface/action/ContributionManager.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/action/ContributionManager.d	Wed Mar 18 09:57:53 2009 +0100
@@ -28,7 +28,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Set;
-import tango.io.Stdout;
 import tango.core.Exception;
 
 /**
@@ -188,16 +187,16 @@
             size = contributions.size();
         }
 
-        Stdout.formatln(this.toString());
-        Stdout.formatln("   Number of elements: {}", size);//$NON-NLS-1$
+        getDwtLogger().info( __FILE__, __LINE__, "{}", this.toString());
+        getDwtLogger().info( __FILE__, __LINE__, "   Number of elements: {}", size);//$NON-NLS-1$
         int sum = 0;
         for (int i = 0; i < size; i++) {
             if ((cast(IContributionItem) contributions.get(i)).isVisible()) {
                 sum++;
             }
         }
-        Stdout.formatln("   Number of visible elements: {}", sum);//$NON-NLS-1$
-        Stdout.formatln("   Is dirty: {}", isDirty()); //$NON-NLS-1$
+        getDwtLogger().info( __FILE__, __LINE__, "   Number of visible elements: {}", sum);//$NON-NLS-1$
+        getDwtLogger().info( __FILE__, __LINE__, "   Is dirty: {}", isDirty()); //$NON-NLS-1$
     }
 
     /*
@@ -535,7 +534,7 @@
             IContributionItem item = cast(IContributionItem) contributions.get(i);
             if ((item !is null) && (identifier.equals(item.getId()))) {
                 if (Policy.TRACE_TOOLBAR) {
-                    Stdout.formatln("Removing duplicate on replace: {}", identifier); //$NON-NLS-1$
+                    getDwtLogger().info( __FILE__, __LINE__, "Removing duplicate on replace: {}", identifier); //$NON-NLS-1$
                 }
                 contributions.remove(i);
                 itemRemoved(item);
--- a/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.d	Wed Mar 18 09:57:53 2009 +0100
@@ -39,7 +39,6 @@
 import java.util.Iterator;
 import java.util.HashMap;
 import java.util.Set;
-import tango.io.Stdout;
 
 /**
  * A cool bar manager is a contribution manager which realizes itself and its
@@ -205,9 +204,9 @@
             String secondId = currentItem.getId();
             if (firstId.equals(secondId)) {
                 if (Policy.TRACE_TOOLBAR) {
-                    Stdout.formatln("Trying to add a duplicate item."); //$NON-NLS-1$
-                    ExceptionPrintStackTrace(new Exception(null), Stdout );
-                    Stdout.formatln("DONE --------------------------"); //$NON-NLS-1$
+                    getDwtLogger().info( __FILE__, __LINE__, "Trying to add a duplicate item."); //$NON-NLS-1$
+                    ExceptionPrintStackTrace(new Exception(null), & getDwtLogger().info );
+                    getDwtLogger().info( __FILE__, __LINE__, "DONE --------------------------"); //$NON-NLS-1$
                 }
                 return false;
             }
--- a/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarContributionItem.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarContributionItem.d	Wed Mar 18 09:57:53 2009 +0100
@@ -49,7 +49,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Set;
-import tango.io.Stdout;
 
 /**
  * The <code>ToolBarContributionItem</code> class provides a wrapper for tool
@@ -164,8 +163,8 @@
     private final bool checkDisposed() {
         if (disposed) {
             if (Policy.TRACE_TOOLBAR) {
-                Stdout.formatln("Method invocation on a disposed tool bar contribution item."); //$NON-NLS-1$
-                ExceptionPrintStackTrace( new Exception(null), Stdout );
+                getDwtLogger.info( __FILE__, __LINE__, "Method invocation on a disposed tool bar contribution item."); //$NON-NLS-1$
+                ExceptionPrintStackTrace( new Exception(null), & getDwtLogger().info );
             }
 
             return true;
--- a/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.d	Wed Mar 18 09:57:53 2009 +0100
@@ -52,9 +52,7 @@
 import java.lang.all;
 import java.util.Set;
 import java.lang.JThread;
-static import tango.text.Text;
-import tango.io.Stdout;
-alias tango.text.Text.Text!(char) StringBuffer;
+
 /**
  * ContentProposalAdapter can be used to attach content proposal behavior to a
  * control. This behavior includes obtaining proposals, opening a popup dialog,
@@ -1682,7 +1680,7 @@
      */
     private void addControlListener(Control control) {
         if (DEBUG) {
-            Stdout.formatln("ContentProposalListener#installControlListener()"); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "ContentProposalListener#installControlListener()"); //$NON-NLS-1$
         }
 
         if (controlListener !is null) {
@@ -1822,7 +1820,7 @@
                 sb.append(Format("; doit={}", e.doit)); //$NON-NLS-1$
                 sb.append(Format("; detail={}", e.detail, hex(e.detail))); //$NON-NLS-1$
                 sb.append(Format("; widget={}", e.widget)); //$NON-NLS-1$
-                Stdout.formatln("{}",sb.toString);
+                getDwtLogger.info( __FILE__, __LINE__, "{}",sb.toString);
             }
 
             private String hex(int i) {
@@ -1834,7 +1832,7 @@
         control.addListener(SWT.Modify, controlListener);
 
         if (DEBUG) {
-            Stdout.formatln("ContentProposalAdapter#installControlListener() - installed"); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "ContentProposalAdapter#installControlListener() - installed"); //$NON-NLS-1$
         }
     }
 
@@ -1856,7 +1854,7 @@
                 IContentProposal[] proposals = getProposals();
                 if (proposals.length > 0) {
                     if (DEBUG) {
-                        Stdout.formatln("POPUP OPENED BY PRECEDING EVENT"); //$NON-NLS-1$
+                        getDwtLogger.info( __FILE__, __LINE__, "POPUP OPENED BY PRECEDING EVENT"); //$NON-NLS-1$
                     }
                     recordCursorPosition();
                     popup = new ContentProposalPopup(null, proposals);
@@ -1996,7 +1994,7 @@
             return null;
         }
         if (DEBUG) {
-            Stdout.formatln(">>> obtaining proposals from provider"); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, ">>> obtaining proposals from provider"); //$NON-NLS-1$
         }
         int position = insertionPos;
         if (position is -1) {
@@ -2057,7 +2055,7 @@
      */
     private void notifyProposalAccepted(IContentProposal proposal) {
         if (DEBUG) {
-            Stdout.formatln("Notify listeners - proposal accepted."); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Notify listeners - proposal accepted."); //$NON-NLS-1$
         }
         Object[] listenerArray = proposalListeners.getListeners();
         for (int i = 0; i < listenerArray.length; i++) {
@@ -2071,7 +2069,7 @@
      */
     private void notifyPopupOpened() {
         if (DEBUG) {
-            Stdout.formatln("Notify listeners - popup opened."); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Notify listeners - popup opened."); //$NON-NLS-1$
         }
         Object[] listenerArray = proposalListeners2.getListeners();
         for (int i = 0; i < listenerArray.length; i++) {
@@ -2085,7 +2083,7 @@
      */
     private void notifyPopupClosed() {
         if (DEBUG) {
-            Stdout.formatln("Notify listeners - popup closed."); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Notify listeners - popup closed."); //$NON-NLS-1$
         }
         Object[] listenerArray = proposalListeners2.getListeners();
         for (int i = 0; i < listenerArray.length; i++) {
--- a/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.d	Wed Mar 18 09:57:53 2009 +0100
@@ -44,7 +44,6 @@
 
 import java.lang.all;
 import java.util.Set;
-import tango.io.Stdout;
 
 /**
  * ControlDecoration renders an image decoration near a control. It allows
@@ -1118,11 +1117,11 @@
         }
         if (DEBUG) {
             if (listenerInstalls > 0) {
-                Stdout.formatln("LISTENER LEAK>>>CHECK TRACE ABOVE"); //$NON-NLS-1$
+                getDwtLogger.info( __FILE__, __LINE__, "LISTENER LEAK>>>CHECK TRACE ABOVE"); //$NON-NLS-1$
             } else if (listenerInstalls < 0) {
-                Stdout.formatln("REMOVED UNREGISTERED LISTENERS>>>CHECK TRACE ABOVE"); //$NON-NLS-1$
+                getDwtLogger.info( __FILE__, __LINE__, "REMOVED UNREGISTERED LISTENERS>>>CHECK TRACE ABOVE"); //$NON-NLS-1$
             } else {
-                Stdout.formatln("ALL INSTALLED LISTENERS WERE REMOVED."); //$NON-NLS-1$
+                getDwtLogger.info( __FILE__, __LINE__, "ALL INSTALLED LISTENERS WERE REMOVED."); //$NON-NLS-1$
             }
         }
     }
@@ -1201,7 +1200,7 @@
     private void printAddListener(Widget widget, String listenerType) {
         listenerInstalls++;
         if (DEBUG) {
-            Stdout.formatln("Added listener>>>{} to>>>{}", listenerType, widget); //$NON-NLS-1$//$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "Added listener>>>{} to>>>{}", listenerType, widget); //$NON-NLS-1$//$NON-NLS-2$
         }
     }
 
@@ -1211,7 +1210,7 @@
     private void printRemoveListener(Widget widget, String listenerType) {
         listenerInstalls--;
         if (DEBUG) {
-            Stdout.formatln("Removed listener>>>{} from>>>{}", listenerType, widget); //$NON-NLS-1$//$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "Removed listener>>>{} from>>>{}", listenerType, widget); //$NON-NLS-1$//$NON-NLS-2$
         }
     }
 }
--- a/org.eclipse.jface/src/org/eclipse/jface/fieldassist/FieldAssistColors.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/fieldassist/FieldAssistColors.d	Wed Mar 18 09:57:53 2009 +0100
@@ -27,7 +27,6 @@
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Set;
-import tango.io.Stdout;
 
 /**
  * FieldAssistColors defines protocol for retrieving colors that can be used to
@@ -170,8 +169,8 @@
         List toBeRemoved = new ArrayList(1);
 
         if (DEBUG) {
-            Stdout.formatln("Display map is {}", (cast(Object)displays).toString()); //$NON-NLS-1$
-            Stdout.formatln("Color map is {}", (cast(Object)requiredFieldColorMap).toString()); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Display map is {}", (cast(Object)displays).toString()); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Color map is {}", (cast(Object)requiredFieldColorMap).toString()); //$NON-NLS-1$
         }
 
         // Look for any stored colors that were created on this display
@@ -211,13 +210,13 @@
             displays.remove(color);
             // Dispose it
             if (DEBUG) {
-                Stdout.formatln("Disposing color {}", color.toString()); //$NON-NLS-1$
+                getDwtLogger.info( __FILE__, __LINE__, "Disposing color {}", color.toString()); //$NON-NLS-1$
             }
             color.dispose();
         }
         if (DEBUG) {
-            Stdout.formatln("Display map is {}", (cast(Object)displays).toString()); //$NON-NLS-1$
-            Stdout.formatln("Color map is {}", (cast(Object)requiredFieldColorMap).toString()); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Display map is {}", (cast(Object)displays).toString()); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Color map is {}", (cast(Object)requiredFieldColorMap).toString()); //$NON-NLS-1$
         }
     }
 
--- a/org.eclipse.jface/src/org/eclipse/jface/operation/ModalContext.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/operation/ModalContext.d	Wed Mar 18 09:57:53 2009 +0100
@@ -29,7 +29,6 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.Set;
 import java.lang.JThread;
-import tango.io.Stdout;
 
 /**
  * Utility class for supporting modal operations. The runnable passed to the
@@ -388,9 +387,9 @@
                         if (debug_
                                 && !(cast(InterruptedException)throwable )
                                 && !(cast(OperationCanceledException)throwable )) {
-                            Stderr.formatln("Exception in modal context operation:"); //$NON-NLS-1$
+                            getDwtLogger.error( __FILE__, __LINE__, "Exception in modal context operation:"); //$NON-NLS-1$
                             ExceptionPrintStackTrace(throwable);
-                            Stderr.formatln("Called from:"); //$NON-NLS-1$
+                            getDwtLogger.error( __FILE__, __LINE__, "Called from:"); //$NON-NLS-1$
                             // Don't create the InvocationTargetException on the
                             // throwable,
                             // otherwise it will print its stack trace (from the
--- a/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.d	Wed Mar 18 09:57:53 2009 +0100
@@ -67,7 +67,6 @@
         public synchronized void load( InputStream inStream ){
             char[] line;
             bool eof = false;
-            //tango.io.Stdout.Stdout.formatln( "properties put ..." );
             void readLine(){
                 line.length = 0;
                 char[1] rdbuf;
@@ -79,22 +78,18 @@
                 eof = i !is 1;
             }
 
-            //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ );
             bool linecontinue = false;
             bool iskeypart = true;
             char[] key;
             char[] value;
     nextline:
             while( !eof ){
-                //tango.io.Stdout.Stdout.formatln( "properties put {} startline", __LINE__ );
                 readLine();
                 line = tango.text.Util.trim( line );
                 if( line.length == 0 ){
-                    //tango.io.Stdout.Stdout.formatln( "properties put {} was 0 length", __LINE__ );
                     continue;
                 }
                 if( line[0] == '#' ){
-                    //tango.io.Stdout.Stdout.formatln( "properties put {} was comment", __LINE__ );
                     continue;
                 }
                 int pos = 0;
@@ -144,15 +139,13 @@
                     }
                 }
                 if( iskeypart ){
-                    tango.io.Stdout.Stdout.formatln( "dejavu.util.Properties put cannot find '='." );
+                    getDwtLogger().error( __FILE__, __LINE__, "put cannot find '='." );
                     continue;
                 }
                 key = tango.text.Util.trim( key );
                 value = tango.text.Util.trim(value);
-                //tango.io.Stdout.Stdout.formatln( "properties put {}=>{}", key, value );
 
                 map[ key.dup ] = value.dup;
-                //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ );
             }
         }
 
--- a/org.eclipse.jface/src/org/eclipse/jface/util/Policy.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/util/Policy.d	Wed Mar 18 09:57:53 2009 +0100
@@ -29,7 +29,6 @@
 
 import java.lang.all;
 import java.util.Set;
-import tango.io.Stdout;
 
 /**
  * The Policy class handles settings for behaviour, debug flags and logging
@@ -81,13 +80,13 @@
     private static ILogger getDummyLog() {
         return new class ILogger {
             public void log(IStatus status) {
-                Stderr.formatln(status.getMessage());
+                getDwtLogger.error( __FILE__, __LINE__, status.getMessage());
                 if (status.getException() !is null) {
                     auto e = status.getException();
-                    Stderr.formatln( "Exception of type {} in {}({}): {}", e.classinfo.name, e.file, e.line, e.msg );
+                    getDwtLogger.error( __FILE__, __LINE__,  "Exception of type {} in {}({}): {}", e.classinfo.name, e.file, e.line, e.msg );
                     if( e.info !is null ){
                         foreach( msg; e.info ){
-                            Stderr.formatln( "    trc: {}", msg );
+                            getDwtLogger.error( __FILE__, __LINE__,  "    trc: {}", msg );
                         }
                     }
 //                     status.getException().printStackTrace();
--- a/org.eclipse.jface/src/org/eclipse/jface/window/Window.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/window/Window.d	Wed Mar 18 09:57:53 2009 +0100
@@ -42,7 +42,6 @@
 import java.lang.all;
 import java.util.ArrayList;
 import java.util.Set;
-import tango.io.Stdout;
 
 /**
  * A JFace window is an object that has no visual representation (no widgets)
@@ -393,7 +392,7 @@
             }
 
             if (nonDisposedImages.size() <= 0) {
-                Stderr.formatln("Window.configureShell: images disposed"); //$NON-NLS-1$
+                getDwtLogger.error( __FILE__, __LINE__, "Window.configureShell: images disposed"); //$NON-NLS-1$
             } else {
                 newShell.setImages(arraycast!(Image)(nonDisposedImages.toArray()));
             }
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTError.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTError.d	Wed Mar 18 09:57:53 2009 +0100
@@ -147,14 +147,14 @@
  * </p>
  */
 public void printStackTrace () {
-    getDwtLogger().error( "stacktrace follows (if feature compiled in)" );
+    getDwtLogger().error(  __FILE__, __LINE__, "stacktrace follows (if feature compiled in)" );
     foreach( msg; info ){
-        getDwtLogger().error( "{}", msg );
+        getDwtLogger().error(  __FILE__, __LINE__, "{}", msg );
     }
     if ( throwable !is null) {
-        getDwtLogger().error ("*** Stack trace of contained error ***"); //$NON-NLS-1$
+        getDwtLogger().error ( __FILE__, __LINE__, "*** Stack trace of contained error ***"); //$NON-NLS-1$
         foreach( msg; throwable.info ){
-            getDwtLogger().error( "{}", msg );
+            getDwtLogger().error(  __FILE__, __LINE__, "{}", msg );
         }
     }
 }
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTException.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTException.d	Wed Mar 18 09:57:53 2009 +0100
@@ -138,14 +138,14 @@
  * </p>
  */
 public void printStackTrace () {
-    getDwtLogger().error( "stacktrace follows (if feature compiled in)" );
+    getDwtLogger().error(  __FILE__, __LINE__, "stacktrace follows (if feature compiled in)" );
     foreach( msg; info ){
-        getDwtLogger().error( "{}", msg );
+        getDwtLogger().error(  __FILE__, __LINE__, "{}", msg );
     }
     if ( throwable !is null) {
-        getDwtLogger().error ("*** Stack trace of contained exception ***"); //$NON-NLS-1$
+        getDwtLogger().error ( __FILE__, __LINE__, "*** Stack trace of contained exception ***"); //$NON-NLS-1$
         foreach( msg; throwable.info ){
-            getDwtLogger().error( "{}", msg );
+            getDwtLogger().error(  __FILE__, __LINE__, "{}", msg );
         }
     }
 }
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/graphics/Device.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/graphics/Device.d	Wed Mar 18 09:57:53 2009 +0100
@@ -887,7 +887,7 @@
                 if (transforms !is 0) string ~= String_valueOf(transforms) ~ " Transforms(s), ";
                 if (string.length !is 0) {
                     string = string.substring (0, string.length - 2);
-                    getDwtLogger().error ( "{}", string);
+                    getDwtLogger().error (  __FILE__, __LINE__, "{}", string);
                 }
                 for (int i=0; i<errors.length; i++) {
                     if (errors [i] !is null) ExceptionPrintStackTrace( errors [i]);
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/gdip/native.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/gdip/native.d	Wed Mar 18 09:57:53 2009 +0100
@@ -1681,11 +1681,11 @@
         foreach( inout s; symbols ){
             *s.symbol = lib.getSymbol( s.name.ptr );
             if( s.symbol is null ){
-                getDwtLogger.error("gdiplus.dll: Symbol '{}' not found", s.name );
+                getDwtLogger.error( __FILE__, __LINE__, "gdiplus.dll: Symbol '{}' not found", s.name );
             }
         }
     } else {
-        getDwtLogger.error("Could not load the library gdiplus.dll");
+        getDwtLogger.error( __FILE__, __LINE__, "Could not load the library gdiplus.dll");
     }
 }
 
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d	Wed Mar 18 09:57:53 2009 +0100
@@ -30,7 +30,7 @@
 alias org.eclipse.swt.internal.win32.WINAPI DWTWINAPI;
 
 void trace(int line ){
-    getDwtLogger.trace( "OS {}", line );
+    getDwtLogger.trace(  __FILE__, __LINE__, "OS {}", line );
 }
 
 // declare of Callback functions
@@ -89,12 +89,12 @@
                 if( OS.WIN32_VERSION >= OS.VERSION( s.major, s.minor )){
                     *s.symbol = lib.getSymbol( s.name.ptr );
                     if( s.symbol is null ){
-                        getDwtLogger.error( "{}: Symbol '{}' not found", libname, s.name );
+                        getDwtLogger.error(  __FILE__, __LINE__, "{}: Symbol '{}' not found", libname, s.name );
                     }
                 }
             }
         } else {
-            getDwtLogger.error( "Could not load the library {}", libname );
+            getDwtLogger.error(  __FILE__, __LINE__, "Could not load the library {}", libname );
         }
     }
 
@@ -402,7 +402,7 @@
         void printError( char[] msg ){
             char[] winMsg = tango.sys.Common.SysError.lastMsg();
             char[2000] buf;
-            getDwtLogger.error("{}: {}", msg, CodePage.from( winMsg, buf ) );
+            getDwtLogger.error( __FILE__, __LINE__, "{}: {}", msg, CodePage.from( winMsg, buf ) );
         }
         TCHAR[] buffer = new TCHAR[ MAX_PATH ];
         buffer[] = 0;
@@ -2710,12 +2710,12 @@
             if( OS.WIN32_VERSION >= OS.VERSION( s.major, s.minor )){
                 *s.symbol = lib.getSymbol( s.name.ptr );
                 if( *s.symbol is null ){
-                    getDwtLogger.error("UxTheme.dll: Symbol '{}' not found", s.name );
+                    getDwtLogger.error( __FILE__, __LINE__, "UxTheme.dll: Symbol '{}' not found", s.name );
                 }
             }
         }
     } else {
-        getDwtLogger.error("Could not load the library UxTheme.dll");
+        getDwtLogger.error( __FILE__, __LINE__, "Could not load the library UxTheme.dll");
     }
 }
 //----------------------------------------------------------------------
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Widget.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Widget.d	Wed Mar 18 09:57:53 2009 +0100
@@ -123,8 +123,8 @@
             }
             static if (!OS.IsWinCE) {
                 if (OS.COMCTL32_VERSION < OS.VERSION (MAJOR, MINOR)) {
-                    getDwtLogger().warn ("***WARNING: SWT requires comctl32.dll version {}.{} or greater", MAJOR, MINOR); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    getDwtLogger().warn ("***WARNING: Detected: {}.{}", OS.COMCTL32_MAJOR, OS.COMCTL32_MINOR); //$NON-NLS-1$ //$NON-NLS-2$
+                    getDwtLogger().warn ( __FILE__, __LINE__, "***WARNING: SWT requires comctl32.dll version {}.{} or greater", MAJOR, MINOR); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    getDwtLogger().warn ( __FILE__, __LINE__, "***WARNING: Detected: {}.{}", OS.COMCTL32_MAJOR, OS.COMCTL32_MINOR); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             }
             OS.InitCommonControls ();
--- a/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.d	Wed Mar 18 09:09:23 2009 +0100
+++ b/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.d	Wed Mar 18 09:57:53 2009 +0100
@@ -82,7 +82,6 @@
 import java.util.ArrayList;
 import java.util.Set;
 import java.io.InputStream;
-import tango.io.Stdout;
 
 /**
  * This class is a read-only text control that is capable of rendering wrapped
@@ -256,10 +255,10 @@
             Point result = new Point(textWidth, textHeight);
             if (DEBUG_TEXT) {
                 long stop = System.currentTimeMillis();
-                Stdout.formatln("FormText computeSize: {}ms", (stop - start)); //$NON-NLS-1$
+                getDwtLogger.info( __FILE__, __LINE__, "FormText computeSize: {}ms", (stop - start)); //$NON-NLS-1$
             }
             if (DEBUG_TEXTSIZE) {
-                Stdout.formatln("FormText ({}), computeSize: wHint={}, result={}", model.getAccessibleText(), wHint, result); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                getDwtLogger.info( __FILE__, __LINE__, "FormText ({}), computeSize: wHint={}, result={}", model.getAccessibleText(), wHint, result); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             }
             return result;
         }
@@ -320,7 +319,7 @@
             selData = null;
             Rectangle carea = composite.getClientArea();
             if (DEBUG_TEXTSIZE) {
-                Stdout.formatln("FormText layout ({}), carea={}",model.getAccessibleText(),carea); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "FormText layout ({}), carea={}",model.getAccessibleText(),carea); //$NON-NLS-1$ //$NON-NLS-2$
             }
             GC gc = new GC(composite);
             gc.setFont(getFont());
@@ -351,7 +350,7 @@
             gc.dispose();
             if (DEBUG_TEXT) {
                 long stop = System.currentTimeMillis();
-                Stdout.formatln("FormText.layout: {}ms", (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
+                getDwtLogger.info( __FILE__, __LINE__, "FormText.layout: {}ms", (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
             }
         }
     }
@@ -392,7 +391,7 @@
         addListener(SWT.Traverse, new class Listener {
             public void handleEvent(Event e) {
                 if (DEBUG_FOCUS)
-                    Stdout.formatln("Traversal: {}", e); //$NON-NLS-1$
+                    getDwtLogger.info( __FILE__, __LINE__, "Traversal: {}", e); //$NON-NLS-1$
                 switch (e.detail) {
                 case SWT.TRAVERSE_PAGE_NEXT:
                 case SWT.TRAVERSE_PAGE_PREVIOUS:
@@ -419,7 +418,7 @@
                 if (!hasFocus) {
                     hasFocus = true;
                     if (DEBUG_FOCUS) {
-                        Stdout.formatln("FormText: focus gained"); //$NON-NLS-1$
+                        getDwtLogger.info( __FILE__, __LINE__, "FormText: focus gained"); //$NON-NLS-1$
                     }
                     if (!mouseFocus && !controlFocusTransfer) {
                         handleFocusChange();
@@ -429,7 +428,7 @@
 
             public void focusLost(FocusEvent e) {
                 if (DEBUG_FOCUS) {
-                    Stdout.formatln("FormText: focus lost"); //$NON-NLS-1$
+                    getDwtLogger.info( __FILE__, __LINE__, "FormText: focus lost"); //$NON-NLS-1$
                 }
                 if (hasFocus) {
                     hasFocus = false;
@@ -715,7 +714,7 @@
                     break;
                 case SWT.Traverse:
                     if (DEBUG_FOCUS)
-                        Stdout.formatln("Control traversal: {}", e); //$NON-NLS-1$
+                        getDwtLogger.info( __FILE__, __LINE__, "Control traversal: {}", e); //$NON-NLS-1$
                     switch (e.detail) {
                     case SWT.TRAVERSE_PAGE_NEXT:
                     case SWT.TRAVERSE_PAGE_PREVIOUS:
@@ -805,7 +804,7 @@
             exitLink(oldLink, SWT.NULL);
         }
         if (DEBUG_FOCUS)
-            Stdout.formatln("Sync control: {}, oldLink={}", cs, oldLink); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "Sync control: {}, oldLink={}", cs, oldLink); //$NON-NLS-1$ //$NON-NLS-2$
         model.select(cs);
         if (oldLink !is null)
             paintFocusTransfer(oldLink, null);
@@ -1326,7 +1325,7 @@
 
     private void handleMouseClick(MouseEvent e, bool down) {
         if (DEBUG_FOCUS)
-            Stdout.formatln("FormText: mouse click({})", down ); //$NON-NLS-1$ //$NON-NLS-2$
+            getDwtLogger.info( __FILE__, __LINE__, "FormText: mouse click({})", down ); //$NON-NLS-1$ //$NON-NLS-2$
         if (down) {
             // select a hyperlink
             mouseFocus = true;
@@ -1420,7 +1419,7 @@
 
     private bool advance(bool next) {
         if (DEBUG_FOCUS)
-            Stdout.formatln("Advance: next={}", next); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Advance: next={}", next); //$NON-NLS-1$
         IFocusSelectable current = model.getSelectedSegment();
         if (current !is null && null !is cast(IHyperlinkSegment)current )
             exitLink(cast(IHyperlinkSegment) current, SWT.NULL);
@@ -1460,7 +1459,7 @@
 
     private void handleFocusChange() {
         if (DEBUG_FOCUS) {
-            Stdout.formatln("Handle focus change: hasFocus={}, mouseFocus={}", hasFocus, //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "Handle focus change: hasFocus={}, mouseFocus={}", hasFocus, //$NON-NLS-1$
                     mouseFocus); //$NON-NLS-1$
         }
         if (hasFocus) {
@@ -1664,7 +1663,7 @@
         }
         Rectangle trim = computeTrim(0, 0, size.x, size.y);
         if (DEBUG_TEXTSIZE)
-            Stdout.formatln("FormText Computed size: {}",trim); //$NON-NLS-1$
+            getDwtLogger.info( __FILE__, __LINE__, "FormText Computed size: {}",trim); //$NON-NLS-1$
         return new Point(trim.width, trim.height);
     }