equal
deleted
inserted
replaced
26 package sun.awt; |
26 package sun.awt; |
27 |
27 |
28 import java.io.*; |
28 import java.io.*; |
29 |
29 |
30 import java.util.*; |
30 import java.util.*; |
31 import java.util.logging.*; |
31 import sun.util.logging.PlatformLogger; |
32 |
32 |
33 /* |
33 /* |
34 * Internal class that manages sun.awt.Debug settings. |
34 * Internal class that manages sun.awt.Debug settings. |
35 * Settings can be specified on a global, per-package, |
35 * Settings can be specified on a global, per-package, |
36 * or per-class level. |
36 * or per-class level. |
70 * the native logging is enabled, the actual debug settings |
70 * the native logging is enabled, the actual debug settings |
71 * are read the same way as described above (as before |
71 * are read the same way as described above (as before |
72 * the fix for 4638447). |
72 * the fix for 4638447). |
73 */ |
73 */ |
74 final class DebugSettings { |
74 final class DebugSettings { |
75 private static final Logger log = Logger.getLogger("sun.awt.debug.DebugSettings"); |
75 private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.debug.DebugSettings"); |
76 |
76 |
77 /* standard debug property key names */ |
77 /* standard debug property key names */ |
78 static final String PREFIX = "awtdebug"; |
78 static final String PREFIX = "awtdebug"; |
79 static final String PROP_FILE = "properties"; |
79 static final String PROP_FILE = "properties"; |
80 |
80 |
126 return null; |
126 return null; |
127 } |
127 } |
128 }); |
128 }); |
129 |
129 |
130 // echo the initial property settings to stdout |
130 // echo the initial property settings to stdout |
131 if (log.isLoggable(Level.FINE)) { |
131 if (log.isLoggable(PlatformLogger.FINE)) { |
132 log.log(Level.FINE, "DebugSettings:\n{0}", this); |
132 log.fine("DebugSettings:\n{0}" + this); |
133 } |
133 } |
134 } |
134 } |
135 |
135 |
136 public String toString() { |
136 public String toString() { |
137 Enumeration enum_ = props.propertyNames(); |
137 Enumeration enum_ = props.propertyNames(); |
256 } |
256 } |
257 return propNames.elements(); |
257 return propNames.elements(); |
258 } |
258 } |
259 |
259 |
260 private void println(Object object) { |
260 private void println(Object object) { |
261 if (log.isLoggable(Level.FINER)) { |
261 if (log.isLoggable(PlatformLogger.FINER)) { |
262 log.log(Level.FINER, object.toString()); |
262 log.finer(object.toString()); |
263 } |
263 } |
264 } |
264 } |
265 |
265 |
266 private static final String PROP_CTRACE = "ctrace"; |
266 private static final String PROP_CTRACE = "ctrace"; |
267 private static final int PROP_CTRACE_LEN = PROP_CTRACE.length(); |
267 private static final int PROP_CTRACE_LEN = PROP_CTRACE.length(); |