MCPcopy Create free account
hub / github.com/M66B/FairEmail / LogSupport

Class LogSupport

app/src/main/java/com/sun/activation/registries/LogSupport.java:19–55  ·  view source on GitHub ↗

Logging related methods.

Source from the content-addressed store, hash-verified

17 * Logging related methods.
18 */
19public class LogSupport {
20 private static boolean debug = false;
21 private static Logger logger;
22 private static final Level level = Level.FINE;
23
24 static {
25 try {
26 debug = Boolean.getBoolean("javax.activation.debug");
27 } catch (Throwable t) {
28 // ignore any errors
29 }
30 logger = Logger.getLogger("javax.activation");
31 }
32
33 /**
34 * Constructor.
35 */
36 private LogSupport() {
37 // private constructor, can't create instances
38 }
39
40 public static void log(String msg) {
41 if (debug)
42 System.out.println(msg);
43 logger.log(level, msg);
44 }
45
46 public static void log(String msg, Throwable t) {
47 if (debug)
48 System.out.println(msg + "; Exception: " + t);
49 logger.log(level, msg, t);
50 }
51
52 public static boolean isLoggable() {
53 return debug || logger.isLoggable(level);
54 }
55}

Callers

nothing calls this directly

Calls 2

getBooleanMethod · 0.80
getLoggerMethod · 0.80

Tested by

no test coverage detected