diff --git a/samples/src/module-info.java b/samples/src/module-info.java index 84c58e8..cd15b42 100644 --- a/samples/src/module-info.java +++ b/samples/src/module-info.java @@ -4,14 +4,16 @@ open module sample.atriasoft.ege { exports sample.atriasoft.ege.mapFactory; + exports sample.atriasoft.ege.mapFactory.model; + exports sample.atriasoft.ege.mapFactory.tools; exports sample.atriasoft.ege.collisiontest; exports sample.atriasoft.ege.lowPoly; exports sample.atriasoft.ege.loxelEngine; exports sample.atriasoft.ege.oldTest; exports sample.atriasoft.ege.s1_texturedCube; - requires org.atriasoft.ege; - requires org.atriasoft.ewol; - requires org.atriasoft.etk; - requires org.atriasoft.gale; // for map factory + requires transitive org.atriasoft.ege; + requires transitive org.atriasoft.ewol; + requires transitive org.atriasoft.etk; + requires transitive org.atriasoft.gale; // for map factory } diff --git a/src/org/atriasoft/ege/internal/Log.java b/src/org/atriasoft/ege/internal/Log.java index d26120c..57efaf4 100644 --- a/src/org/atriasoft/ege/internal/Log.java +++ b/src/org/atriasoft/ege/internal/Log.java @@ -4,6 +4,7 @@ import io.scenarium.logger.LogLevel; import io.scenarium.logger.Logger; public class Log { + private static final boolean FORCE_ALL = false; private static final String LIB_NAME = "ege"; private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME); private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL); @@ -14,52 +15,59 @@ public class Log { private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE); private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO); private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT); - - public static void critical(final String data) { - if (PRINT_CRITICAL) { - Logger.critical(LIB_NAME_DRAW, data); + + public static void critical(final Exception e, final String data) { + e.printStackTrace(); + if (PRINT_CRITICAL || FORCE_ALL) { + Logger.critical(LIB_NAME_DRAW, data + " : " + e.getMessage()); } } - public static void debug(final String data) { - if (PRINT_DEBUG) { - Logger.debug(LIB_NAME_DRAW, data); + public static void critical(final String data, final Object... objects) { + if (PRINT_CRITICAL || FORCE_ALL) { + Logger.critical(LIB_NAME_DRAW, data, objects); } } - public static void error(final String data) { - if (PRINT_ERROR) { - Logger.error(LIB_NAME_DRAW, data); + public static void debug(final String data, final Object... objects) { + if (PRINT_DEBUG || FORCE_ALL) { + Logger.debug(LIB_NAME_DRAW, data, objects); } } - public static void info(final String data) { - if (PRINT_INFO) { - Logger.info(LIB_NAME_DRAW, data); + public static void error(final String data, final Object... objects) { + if (PRINT_ERROR || FORCE_ALL) { + Logger.error(LIB_NAME_DRAW, data, objects); } } - public static void print(final String data) { - if (PRINT_PRINT) { - Logger.print(LIB_NAME_DRAW, data); + public static void info(final String data, final Object... objects) { + if (PRINT_INFO || FORCE_ALL) { + Logger.info(LIB_NAME_DRAW, data, objects); } } - public static void todo(final String data) { - if (PRINT_TODO) { - Logger.todo(LIB_NAME_DRAW, data); + public static void print(final String data, final Object... objects) { + if (PRINT_PRINT || FORCE_ALL) { + Logger.print(LIB_NAME_DRAW, data, objects); } } - public static void verbose(final String data) { - if (PRINT_VERBOSE) { - Logger.verbose(LIB_NAME_DRAW, data); + public static void todo(final String data, final Object... objects) { + if (PRINT_TODO || FORCE_ALL) { + Logger.todo(LIB_NAME_DRAW, data, objects); } } - public static void warning(final String data) { - if (PRINT_WARNING) { - Logger.warning(LIB_NAME_DRAW, data); + public static void verbose(final String data, final Object... objects) { + if (PRINT_VERBOSE || FORCE_ALL) { + Logger.verbose(LIB_NAME_DRAW, data, objects); + } + } + + public static void warning(final String data, final Object... objects) { + if (PRINT_WARNING || FORCE_ALL) { + Logger.warning(LIB_NAME_DRAW, data, objects); } }