projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more spaces in help message
[mkws-moved-to-github.git]
/
src
/
mkws-core.js
diff --git
a/src/mkws-core.js
b/src/mkws-core.js
index
19718e8
..
528ed94
100644
(file)
--- a/
src/mkws-core.js
+++ b/
src/mkws-core.js
@@
-114,7
+114,11
@@
var consoleAppender = JL.createConsoleAppender('consoleAppender');
mkws.logger.setOptions({ "appenders": [consoleAppender] });
mkws.logger.setOptions({ "appenders": [consoleAppender] });
-function _log(fn, string) { fn.call(mkws.logger, string); };
+function _log() {
+ var argsAsARealArray = Array.prototype.slice.call(arguments);
+ var fn = argsAsARealArray.shift();
+ fn.apply(mkws.logger, argsAsARealArray);
+};
mkws.trace = function(x) { _log(mkws.logger.trace, x) };
mkws.debug = function(x) { _log(mkws.logger.debug, x) };
mkws.info = function(x) { _log(mkws.logger.info, x) };
mkws.trace = function(x) { _log(mkws.logger.trace, x) };
mkws.debug = function(x) { _log(mkws.logger.debug, x) };
mkws.info = function(x) { _log(mkws.logger.info, x) };
@@
-161,13
+165,6
@@
mkws.promotionFunction = function(name) {
mkws.setMkwsConfig = function(overrides) {
mkws.setMkwsConfig = function(overrides) {
- // Set global log_level flag early so that _log() works
- var tmp = overrides.log_level;
- if (typeof(tmp) !== 'undefined') {
- console.log("setting level to '" + tmp + "'");
- mkws.logger.setOptions({ "level": mkws.stringToLevel(tmp) });
- }
-
var config_default = {
use_service_proxy: true,
pazpar2_url: undefined,
var config_default = {
use_service_proxy: true,
pazpar2_url: undefined,
@@
-667,4
+664,11
@@
mkws.info("Using window.name '" + window.name + "'");
}
});
}
});
+ // Set global log_level flag early so that _log() works
+ if (typeof mkws_config !== 'undefined') {
+ var tmp = mkws_config.log_level;
+ if (typeof tmp !== 'undefined') {
+ mkws.logger.setOptions({ "level": mkws.stringToLevel(tmp) });
+ }
+ }
})(mkws.$);
})(mkws.$);