123 public static void log(Object logger, Object level, String msg, Throwable t) { 124 ensureAvailable(); 125 proxy.log(logger, level, msg, t); 126 } 127 128 public static void log(Object logger, Object level, String msg, Object... params) { 129 ensureAvailable(); 130 proxy.log(logger, level, msg, params); 131 } 132 133 public static Object parseLevel(String levelName) { 134 ensureAvailable(); 135 return proxy.parseLevel(levelName); 136 } 137 138 public static String getLevelName(Object level) { 139 ensureAvailable(); 140 return proxy.getLevelName(level); 141 } 142 143 private static final String DEFAULT_FORMAT = 144 "%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%6$s%n"; 145 146 private static final String FORMAT_PROP_KEY = "java.util.logging.SimpleFormatter.format"; 147 public static String getSimpleFormat() { 148 return getSimpleFormat(true); 149 } 150 151 // useProxy if true will cause initialization of 152 // java.util.logging and read its configuration 153 static String getSimpleFormat(boolean useProxy) { 154 String format = 155 AccessController.doPrivileged( 156 new PrivilegedAction<String>() { 157 public String run() { 158 return System.getProperty(FORMAT_PROP_KEY); 159 } 160 }); 161 162 if (useProxy && proxy != null && format == null) { | 123 public static void log(Object logger, Object level, String msg, Throwable t) { 124 ensureAvailable(); 125 proxy.log(logger, level, msg, t); 126 } 127 128 public static void log(Object logger, Object level, String msg, Object... params) { 129 ensureAvailable(); 130 proxy.log(logger, level, msg, params); 131 } 132 133 public static Object parseLevel(String levelName) { 134 ensureAvailable(); 135 return proxy.parseLevel(levelName); 136 } 137 138 public static String getLevelName(Object level) { 139 ensureAvailable(); 140 return proxy.getLevelName(level); 141 } 142 143 public static int getLevelValue(Object level) { 144 ensureAvailable(); 145 return proxy.getLevelValue(level); 146 } 147 148 private static final String DEFAULT_FORMAT = 149 "%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%6$s%n"; 150 151 private static final String FORMAT_PROP_KEY = "java.util.logging.SimpleFormatter.format"; 152 public static String getSimpleFormat() { 153 return getSimpleFormat(true); 154 } 155 156 // useProxy if true will cause initialization of 157 // java.util.logging and read its configuration 158 static String getSimpleFormat(boolean useProxy) { 159 String format = 160 AccessController.doPrivileged( 161 new PrivilegedAction<String>() { 162 public String run() { 163 return System.getProperty(FORMAT_PROP_KEY); 164 } 165 }); 166 167 if (useProxy && proxy != null && format == null) { |