19 package com.mysql.clusterj.core.util;
21 import java.util.logging.Level;
32 public boolean isDetailEnabled() {
33 return delegate.isLoggable(Level.FINEST);
36 public boolean isDebugEnabled() {
37 return delegate.isLoggable(Level.FINER);
40 public boolean isTraceEnabled() {
41 return delegate.isLoggable(Level.FINE);
44 public boolean isInfoEnabled() {
45 return delegate.isLoggable(Level.INFO);
49 Throwable t =
new Throwable();
50 StackTraceElement[] stack = t.getStackTrace();
51 StackTraceElement element = stack[1];
52 String className = element.getClassName();
53 String methodName = element.getMethodName();
54 delegate.logp(Level.FINEST, className, methodName, message);
57 public void debug(
String message) {
58 Throwable t =
new Throwable();
59 StackTraceElement[] stack = t.getStackTrace();
60 StackTraceElement element = stack[1];
61 String className = element.getClassName();
62 String methodName = element.getMethodName();
63 delegate.logp(Level.FINER, className, methodName, message);
66 public void trace(
String message) {
67 Throwable t =
new Throwable();
68 StackTraceElement[] stack = t.getStackTrace();
69 StackTraceElement element = stack[1];
70 String className = element.getClassName();
71 String methodName = element.getMethodName();
72 delegate.logp(Level.FINE, className, methodName, message);
75 public void info(
String message) {
76 Throwable t =
new Throwable();
77 StackTraceElement[] stack = t.getStackTrace();
78 StackTraceElement element = stack[1];
79 String className = element.getClassName();
80 String methodName = element.getMethodName();
81 delegate.logp(Level.INFO, className, methodName, message);
84 public void warn(
String message) {
85 Throwable t =
new Throwable();
86 StackTraceElement[] stack = t.getStackTrace();
87 StackTraceElement element = stack[1];
88 String className = element.getClassName();
89 String methodName = element.getMethodName();
90 delegate.logp(Level.WARNING, className, methodName, message);
93 public void error(
String message) {
94 Throwable t =
new Throwable();
95 StackTraceElement[] stack = t.getStackTrace();
96 StackTraceElement element = stack[1];
97 String className = element.getClassName();
98 String methodName = element.getMethodName();
99 delegate.logp(Level.SEVERE, className, methodName, message);
102 public void fatal(
String message) {
103 Throwable t =
new Throwable();
104 StackTraceElement[] stack = t.getStackTrace();
105 StackTraceElement element = stack[1];
106 String className = element.getClassName();
107 String methodName = element.getMethodName();
108 delegate.logp(Level.SEVERE, className, methodName, message);