Mercurial > projects > dwt2
comparison org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Activator.d @ 85:6be48cf9f95c
Work on databinding
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 18 Apr 2009 13:54:50 +0200 |
parents | 0a55d2d5a946 |
children |
comparison
equal
deleted
inserted
replaced
84:fcf926c91ca4 | 85:6be48cf9f95c |
---|---|
42 */ | 42 */ |
43 public this() { | 43 public this() { |
44 } | 44 } |
45 | 45 |
46 public void start(BundleContext context) { | 46 public void start(BundleContext context) { |
47 _frameworkLogTracker = new ServiceTracker(context, FrameworkLog.classinfo.getName(), null); | 47 _frameworkLogTracker = new ServiceTracker(context, FrameworkLog.classinfo.name, null); |
48 _frameworkLogTracker.open(); | 48 _frameworkLogTracker.open(); |
49 | 49 |
50 Policy.setLog(new class() ILogger { | 50 Policy.setLog(new class() ILogger { |
51 | 51 |
52 public void log(IStatus status) { | 52 public void log(IStatus status) { |
54 FrameworkLog log = frameworkLogTracker is null ? null : cast(FrameworkLog) frameworkLogTracker.getService(); | 54 FrameworkLog log = frameworkLogTracker is null ? null : cast(FrameworkLog) frameworkLogTracker.getService(); |
55 if (log !is null) { | 55 if (log !is null) { |
56 log.log(createLogEntry(status)); | 56 log.log(createLogEntry(status)); |
57 } else { | 57 } else { |
58 // fall back to System.err | 58 // fall back to System.err |
59 System.err.println(status.getPlugin() + " - " + status.getCode() + " - " + status.getMessage()); //$NON-NLS-1$//$NON-NLS-2$ | 59 getDwtLogger().error(__FILE__, __LINE__, "{} - {} - {}", status.getPlugin(), status.getCode(), status.getMessage()); //$NON-NLS-1$//$NON-NLS-2$ |
60 if( status.getException() !is null ) { | 60 if( status.getException() !is null ) { |
61 status.getException().printStackTrace(System.err); | 61 ExceptionPrintStackTrace(status.getException()); |
62 } | 62 } |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 }); | 66 }); |