< prev index next >

src/java.desktop/share/classes/sun/font/FontUtilities.java

Print this page
rev 60064 : 8248802: Add log helper methods to FontUtilities.java

@@ -24,14 +24,10 @@
  */
 
 package sun.font;
 
 import java.awt.Font;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
 import java.lang.ref.SoftReference;
 import java.util.concurrent.ConcurrentHashMap;
 import java.security.AccessController;
 
 import java.security.PrivilegedAction;

@@ -110,14 +106,10 @@
                     if (debugLevel.equals("warning")) {
                         logger.setLevel(PlatformLogger.Level.WARNING);
                     } else if (debugLevel.equals("severe")) {
                         logger.setLevel(PlatformLogger.Level.SEVERE);
                     }
-                }
-
-                if (debugFonts) {
-                    logger = PlatformLogger.getLogger("sun.java2d");
                     logging = logger.isEnabled();
                 }
 
                 return null;
             }

@@ -322,10 +314,21 @@
 
     public static boolean debugFonts() {
         return debugFonts;
     }
 
+    public static void logWarning(String s) {
+        getLogger().warning(s);
+    }
+
+    public static void logInfo(String s) {
+        getLogger().info(s);
+    }
+
+    public static void logSevere(String s) {
+        getLogger().severe(s);
+    }
 
     // The following methods are used by Swing.
 
     /* Revise the implementation to in fact mean "font is a composite font.
      * This ensures that Swing components will always benefit from the
< prev index next >