Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / java / util / logging / Logger.js
index 44ec041..0f850e9 100644 (file)
-Clazz.declarePackage ("java.util.logging");\r
-Clazz.load (["java.util.Hashtable", "java.util.logging.Level", "$.LogRecord"], "java.util.logging.Logger", null, function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.name = null;\r
-this.levelObject = null;\r
-this.levelValue = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.util.logging, "Logger");\r
-Clazz.makeConstructor (c$, \r
-function (name, resourceBundleName) {\r
-this.construct (name, resourceBundleName, null, false);\r
-}, "~S,~S");\r
-Clazz.makeConstructor (c$, \r
-function (name, resourceBundleName, caller, isSystemLogger) {\r
-this.name = name;\r
-this.levelValue = java.util.logging.Level.INFO.intValue ();\r
-}, "~S,~S,Class,~B");\r
-Clazz.makeConstructor (c$, \r
- function (name) {\r
-this.name = name;\r
-this.levelValue = java.util.logging.Level.INFO.intValue ();\r
-}, "~S");\r
-c$.getLogger = Clazz.defineMethod (c$, "getLogger", \r
-function (name) {\r
-var log = java.util.logging.Logger.loggers.get (name);\r
-if (log == null) java.util.logging.Logger.loggers.put (name, log =  new java.util.logging.Logger (name));\r
-return log;\r
-}, "~S");\r
-c$.getLogger = Clazz.defineMethod (c$, "getLogger", \r
-function (name, resourceBundleName) {\r
-return java.util.logging.Logger.getLogger (name);\r
-}, "~S,~S");\r
-c$.getAnonymousLogger = Clazz.defineMethod (c$, "getAnonymousLogger", \r
-function () {\r
-return java.util.logging.Logger.getAnonymousLogger (null);\r
-});\r
-c$.getAnonymousLogger = Clazz.defineMethod (c$, "getAnonymousLogger", \r
-function (resourceBundleName) {\r
-return java.util.logging.Logger.global;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "log", \r
-function (record) {\r
-if (record.getLevel ().intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}System.out.println (record.getLoggerName () + ": " + record.getMessage ());\r
-}, "java.util.logging.LogRecord");\r
-Clazz.defineMethod (c$, "doLog", \r
- function (lr) {\r
-lr.setLoggerName (this.name);\r
-this.log (lr);\r
-}, "java.util.logging.LogRecord");\r
-Clazz.defineMethod (c$, "log", \r
-function (level, msg) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S");\r
-Clazz.defineMethod (c$, "log", \r
-function (level, msg, param1) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-var params =  Clazz.newArray (-1, [param1]);\r
-lr.setParameters (params);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,~O");\r
-Clazz.defineMethod (c$, "log", \r
-function (level, msg, params) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-lr.setParameters (params);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,~A");\r
-Clazz.defineMethod (c$, "log", \r
-function (level, msg, thrown) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-lr.setThrown (thrown);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,Throwable");\r
-Clazz.defineMethod (c$, "logp", \r
-function (level, sourceClass, sourceMethod, msg) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-lr.setSourceClassName (sourceClass);\r
-lr.setSourceMethodName (sourceMethod);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,~S,~S");\r
-Clazz.defineMethod (c$, "logp", \r
-function (level, sourceClass, sourceMethod, msg, param1) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-lr.setSourceClassName (sourceClass);\r
-lr.setSourceMethodName (sourceMethod);\r
-var params =  Clazz.newArray (-1, [param1]);\r
-lr.setParameters (params);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,~S,~S,~O");\r
-Clazz.defineMethod (c$, "logp", \r
-function (level, sourceClass, sourceMethod, msg, params) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-lr.setSourceClassName (sourceClass);\r
-lr.setSourceMethodName (sourceMethod);\r
-lr.setParameters (params);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,~S,~S,~A");\r
-Clazz.defineMethod (c$, "logp", \r
-function (level, sourceClass, sourceMethod, msg, thrown) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (level, msg);\r
-lr.setSourceClassName (sourceClass);\r
-lr.setSourceMethodName (sourceMethod);\r
-lr.setThrown (thrown);\r
-this.doLog (lr);\r
-}, "java.util.logging.Level,~S,~S,~S,Throwable");\r
-Clazz.defineMethod (c$, "entering", \r
-function (sourceClass, sourceMethod) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue) {\r
-return;\r
-}this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "ENTRY");\r
-}, "~S,~S");\r
-Clazz.defineMethod (c$, "entering", \r
-function (sourceClass, sourceMethod, param1) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue) {\r
-return;\r
-}var params =  Clazz.newArray (-1, [param1]);\r
-this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "ENTRY {0}", params);\r
-}, "~S,~S,~O");\r
-Clazz.defineMethod (c$, "entering", \r
-function (sourceClass, sourceMethod, params) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue) {\r
-return;\r
-}var msg = "ENTRY";\r
-if (params == null) {\r
-this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, msg);\r
-return;\r
-}for (var i = 0; i < params.length; i++) {\r
-msg = msg + " {" + i + "}";\r
-}\r
-this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, msg, params);\r
-}, "~S,~S,~A");\r
-Clazz.defineMethod (c$, "exiting", \r
-function (sourceClass, sourceMethod) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue) {\r
-return;\r
-}this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "RETURN");\r
-}, "~S,~S");\r
-Clazz.defineMethod (c$, "exiting", \r
-function (sourceClass, sourceMethod, result) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue) {\r
-return;\r
-}this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result);\r
-}, "~S,~S,~O");\r
-Clazz.defineMethod (c$, "throwing", \r
-function (sourceClass, sourceMethod, thrown) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return;\r
-}var lr =  new java.util.logging.LogRecord (java.util.logging.Level.FINER, "THROW");\r
-lr.setSourceClassName (sourceClass);\r
-lr.setSourceMethodName (sourceMethod);\r
-lr.setThrown (thrown);\r
-this.doLog (lr);\r
-}, "~S,~S,Throwable");\r
-Clazz.defineMethod (c$, "severe", \r
-function (msg) {\r
-if (java.util.logging.Level.SEVERE.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.SEVERE, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "warning", \r
-function (msg) {\r
-if (java.util.logging.Level.WARNING.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.WARNING, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "info", \r
-function (msg) {\r
-if (java.util.logging.Level.INFO.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.INFO, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "config", \r
-function (msg) {\r
-if (java.util.logging.Level.CONFIG.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.CONFIG, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "fine", \r
-function (msg) {\r
-if (java.util.logging.Level.FINE.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.FINE, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "finer", \r
-function (msg) {\r
-if (java.util.logging.Level.FINER.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.FINER, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "finest", \r
-function (msg) {\r
-if (java.util.logging.Level.FINEST.intValue () < this.levelValue) {\r
-return;\r
-}this.log (java.util.logging.Level.FINEST, msg);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "setLevel", \r
-function (newLevel) {\r
-this.levelObject = newLevel;\r
-this.updateEffectiveLevel ();\r
-}, "java.util.logging.Level");\r
-Clazz.defineMethod (c$, "getLevel", \r
-function () {\r
-return this.levelObject;\r
-});\r
-Clazz.defineMethod (c$, "isLoggable", \r
-function (level) {\r
-if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {\r
-return false;\r
-}return true;\r
-}, "java.util.logging.Level");\r
-Clazz.defineMethod (c$, "getName", \r
-function () {\r
-return this.name;\r
-});\r
-Clazz.defineMethod (c$, "updateEffectiveLevel", \r
- function () {\r
-var newLevelValue;\r
-if (this.levelObject != null) {\r
-newLevelValue = this.levelObject.intValue ();\r
-} else {\r
-newLevelValue = java.util.logging.Level.INFO.intValue ();\r
-}if (this.levelValue == newLevelValue) {\r
-return;\r
-}this.levelValue = newLevelValue;\r
-});\r
-c$.offValue = c$.prototype.offValue = java.util.logging.Level.OFF.intValue ();\r
-Clazz.defineStatics (c$,\r
-"GLOBAL_LOGGER_NAME", "global");\r
-c$.global = c$.prototype.global =  new java.util.logging.Logger ("global");\r
-c$.loggers = c$.prototype.loggers =  new java.util.Hashtable ();\r
-{\r
-java.util.logging.Logger.loggers.put ("global", java.util.logging.Logger.global);\r
-}});\r
+Clazz.declarePackage ("java.util.logging");
+Clazz.load (["java.util.Hashtable", "java.util.logging.Level", "$.LogRecord"], "java.util.logging.Logger", null, function () {
+c$ = Clazz.decorateAsClass (function () {
+this.name = null;
+this.levelObject = null;
+this.levelValue = 0;
+Clazz.instantialize (this, arguments);
+}, java.util.logging, "Logger");
+Clazz.makeConstructor (c$, 
+function (name, resourceBundleName) {
+this.construct (name, resourceBundleName, null, false);
+}, "~S,~S");
+Clazz.makeConstructor (c$, 
+function (name, resourceBundleName, caller, isSystemLogger) {
+this.name = name;
+this.levelValue = java.util.logging.Level.INFO.intValue ();
+}, "~S,~S,Class,~B");
+Clazz.makeConstructor (c$, 
+ function (name) {
+this.name = name;
+this.levelValue = java.util.logging.Level.INFO.intValue ();
+}, "~S");
+c$.getLogger = Clazz.defineMethod (c$, "getLogger", 
+function (name) {
+var log = java.util.logging.Logger.loggers.get (name);
+if (log == null) java.util.logging.Logger.loggers.put (name, log =  new java.util.logging.Logger (name));
+return log;
+}, "~S");
+c$.getLogger = Clazz.defineMethod (c$, "getLogger", 
+function (name, resourceBundleName) {
+return java.util.logging.Logger.getLogger (name);
+}, "~S,~S");
+c$.getAnonymousLogger = Clazz.defineMethod (c$, "getAnonymousLogger", 
+function () {
+return java.util.logging.Logger.getAnonymousLogger (null);
+});
+c$.getAnonymousLogger = Clazz.defineMethod (c$, "getAnonymousLogger", 
+function (resourceBundleName) {
+return java.util.logging.Logger.global;
+}, "~S");
+Clazz.defineMethod (c$, "log", 
+function (record) {
+if (record.getLevel ().intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}System.out.println (record.getLoggerName () + ": " + record.getMessage ());
+}, "java.util.logging.LogRecord");
+Clazz.defineMethod (c$, "doLog", 
+ function (lr) {
+lr.setLoggerName (this.name);
+this.log (lr);
+}, "java.util.logging.LogRecord");
+Clazz.defineMethod (c$, "log", 
+function (level, msg) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+this.doLog (lr);
+}, "java.util.logging.Level,~S");
+Clazz.defineMethod (c$, "log", 
+function (level, msg, param1) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+var params =  Clazz.newArray (-1, [param1]);
+lr.setParameters (params);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,~O");
+Clazz.defineMethod (c$, "log", 
+function (level, msg, params) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+lr.setParameters (params);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,~A");
+Clazz.defineMethod (c$, "log", 
+function (level, msg, thrown) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+lr.setThrown (thrown);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,Throwable");
+Clazz.defineMethod (c$, "logp", 
+function (level, sourceClass, sourceMethod, msg) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+lr.setSourceClassName (sourceClass);
+lr.setSourceMethodName (sourceMethod);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,~S,~S");
+Clazz.defineMethod (c$, "logp", 
+function (level, sourceClass, sourceMethod, msg, param1) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+lr.setSourceClassName (sourceClass);
+lr.setSourceMethodName (sourceMethod);
+var params =  Clazz.newArray (-1, [param1]);
+lr.setParameters (params);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,~S,~S,~O");
+Clazz.defineMethod (c$, "logp", 
+function (level, sourceClass, sourceMethod, msg, params) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+lr.setSourceClassName (sourceClass);
+lr.setSourceMethodName (sourceMethod);
+lr.setParameters (params);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,~S,~S,~A");
+Clazz.defineMethod (c$, "logp", 
+function (level, sourceClass, sourceMethod, msg, thrown) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (level, msg);
+lr.setSourceClassName (sourceClass);
+lr.setSourceMethodName (sourceMethod);
+lr.setThrown (thrown);
+this.doLog (lr);
+}, "java.util.logging.Level,~S,~S,~S,Throwable");
+Clazz.defineMethod (c$, "entering", 
+function (sourceClass, sourceMethod) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue) {
+return;
+}this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "ENTRY");
+}, "~S,~S");
+Clazz.defineMethod (c$, "entering", 
+function (sourceClass, sourceMethod, param1) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue) {
+return;
+}var params =  Clazz.newArray (-1, [param1]);
+this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "ENTRY {0}", params);
+}, "~S,~S,~O");
+Clazz.defineMethod (c$, "entering", 
+function (sourceClass, sourceMethod, params) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue) {
+return;
+}var msg = "ENTRY";
+if (params == null) {
+this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, msg);
+return;
+}for (var i = 0; i < params.length; i++) {
+msg = msg + " {" + i + "}";
+}
+this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, msg, params);
+}, "~S,~S,~A");
+Clazz.defineMethod (c$, "exiting", 
+function (sourceClass, sourceMethod) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue) {
+return;
+}this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "RETURN");
+}, "~S,~S");
+Clazz.defineMethod (c$, "exiting", 
+function (sourceClass, sourceMethod, result) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue) {
+return;
+}this.logp (java.util.logging.Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result);
+}, "~S,~S,~O");
+Clazz.defineMethod (c$, "throwing", 
+function (sourceClass, sourceMethod, thrown) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return;
+}var lr =  new java.util.logging.LogRecord (java.util.logging.Level.FINER, "THROW");
+lr.setSourceClassName (sourceClass);
+lr.setSourceMethodName (sourceMethod);
+lr.setThrown (thrown);
+this.doLog (lr);
+}, "~S,~S,Throwable");
+Clazz.defineMethod (c$, "severe", 
+function (msg) {
+if (java.util.logging.Level.SEVERE.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.SEVERE, msg);
+}, "~S");
+Clazz.defineMethod (c$, "warning", 
+function (msg) {
+if (java.util.logging.Level.WARNING.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.WARNING, msg);
+}, "~S");
+Clazz.defineMethod (c$, "info", 
+function (msg) {
+if (java.util.logging.Level.INFO.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.INFO, msg);
+}, "~S");
+Clazz.defineMethod (c$, "config", 
+function (msg) {
+if (java.util.logging.Level.CONFIG.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.CONFIG, msg);
+}, "~S");
+Clazz.defineMethod (c$, "fine", 
+function (msg) {
+if (java.util.logging.Level.FINE.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.FINE, msg);
+}, "~S");
+Clazz.defineMethod (c$, "finer", 
+function (msg) {
+if (java.util.logging.Level.FINER.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.FINER, msg);
+}, "~S");
+Clazz.defineMethod (c$, "finest", 
+function (msg) {
+if (java.util.logging.Level.FINEST.intValue () < this.levelValue) {
+return;
+}this.log (java.util.logging.Level.FINEST, msg);
+}, "~S");
+Clazz.defineMethod (c$, "setLevel", 
+function (newLevel) {
+this.levelObject = newLevel;
+this.updateEffectiveLevel ();
+}, "java.util.logging.Level");
+Clazz.defineMethod (c$, "getLevel", 
+function () {
+return this.levelObject;
+});
+Clazz.defineMethod (c$, "isLoggable", 
+function (level) {
+if (level.intValue () < this.levelValue || this.levelValue == java.util.logging.Logger.offValue) {
+return false;
+}return true;
+}, "java.util.logging.Level");
+Clazz.defineMethod (c$, "getName", 
+function () {
+return this.name;
+});
+Clazz.defineMethod (c$, "updateEffectiveLevel", 
+ function () {
+var newLevelValue;
+if (this.levelObject != null) {
+newLevelValue = this.levelObject.intValue ();
+} else {
+newLevelValue = java.util.logging.Level.INFO.intValue ();
+}if (this.levelValue == newLevelValue) {
+return;
+}this.levelValue = newLevelValue;
+});
+c$.offValue = c$.prototype.offValue = java.util.logging.Level.OFF.intValue ();
+Clazz.defineStatics (c$,
+"GLOBAL_LOGGER_NAME", "global");
+c$.global = c$.prototype.global =  new java.util.logging.Logger ("global");
+c$.loggers = c$.prototype.loggers =  new java.util.Hashtable ();
+{
+java.util.logging.Logger.loggers.put ("global", java.util.logging.Logger.global);
+}});