aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/Logging.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/Logging.java')
-rw-r--r--src/java/com/jogamp/gluegen/Logging.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/Logging.java b/src/java/com/jogamp/gluegen/Logging.java
index 7000406..ddefca4 100644
--- a/src/java/com/jogamp/gluegen/Logging.java
+++ b/src/java/com/jogamp/gluegen/Logging.java
@@ -54,6 +54,15 @@ public class Logging {
*/
public static interface LoggerIf {
/**
+ * See {@link Logger#info(String)}
+ */
+ void info(final String msg);
+ /**
+ * See {@link Logger#info(String)}
+ */
+ void info(final ASTLocusTag loc, final String msg);
+
+ /**
* See {@link Logger#warning(String)}
*/
void warning(final String msg);
@@ -63,6 +72,15 @@ public class Logging {
void warning(final ASTLocusTag loc, final String msg);
/**
+ * Calls {@link #log(Level, String)} w/ {@link Level#FINE}.
+ */
+ void debug(final String msg);
+ /**
+ * Calls {@link #log(Level, ASTLocusTag, String)} w/ {@link Level#FINE}.
+ */
+ void debug(final ASTLocusTag loc, final String msg);
+
+ /**
* See {@link Logger#log(Level, String)}
*/
void log(final Level level, final String msg);
@@ -126,6 +144,20 @@ public class Logging {
": obj 0x"+Integer.toHexString(impl.hashCode()));
}
@Override
+ public void info(final String msg) {
+ impl.info(msg);
+ }
+ @Override
+ public void info(final ASTLocusTag loc, final String msg) {
+ handler.plf.setASTLocusTag(loc);
+ try {
+ impl.info(msg);
+ } finally {
+ handler.plf.setASTLocusTag(null);
+ }
+ }
+
+ @Override
public void warning(final String msg) {
impl.warning(msg);
}
@@ -140,6 +172,15 @@ public class Logging {
}
@Override
+ public void debug(final String msg) {
+ log(Level.FINE, msg);
+ }
+ @Override
+ public void debug(final ASTLocusTag loc, final String msg) {
+ log(Level.FINE, loc, msg);
+ }
+
+ @Override
public void log(final Level level, final String msg) {
impl.log(level, msg);
}
@@ -296,6 +337,11 @@ public class Logging {
return rootPackageLogger;
}
/** Returns the demanded logger, while aligning its log-level to the root logger's level. */
+ public static synchronized LoggerIf getLogger(final Class<?> clazz) {
+ return getLogger(clazz.getPackage().getName(), clazz.getSimpleName());
+ }
+
+ /** Returns the demanded logger, while aligning its log-level to the root logger's level. */
public static synchronized LoggerIf getLogger(final String packageName, final String simpleClassName) {
final String fqnClassName = packageName+"."+simpleClassName;
LoggerIf res = loggers.get(fqnClassName);