@urso/core 0.4.52 → 0.4.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/js/index.js +1 -1
- package/package.json +1 -1
- package/src/js/config/main.js +1 -0
- package/src/js/lib/logger.js +1 -3
package/package.json
CHANGED
package/src/js/config/main.js
CHANGED
|
@@ -2,6 +2,7 @@ let ConfigMain = {
|
|
|
2
2
|
title: 'Urso', //game title
|
|
3
3
|
appVersion: 0, //app version, also used as anticache "appVersion=${appVersion}" when not 0
|
|
4
4
|
mode: "development", // development/production/testing
|
|
5
|
+
defaultLogLevel: 'ERROR,WARNING,INFO,LOG', //setup custom log level with: ?logLevel=1,2,3,4 OR ?logLevel=ERROR,WARNING,INFO,LOG
|
|
5
6
|
extendingChain: ['Urso.Core'], //chain that will be set as Urso.Game
|
|
6
7
|
defaultScene: 'play', //default scene to display
|
|
7
8
|
useBinPath: false, // use assets from bin directory
|
package/src/js/lib/logger.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
//setup custom log level with: ?logLevel=1,2,3,4 OR ?logLevel=ERROR,WARNING,INFO,LOG
|
|
2
2
|
|
|
3
|
-
const DEFAULT_LOG_LEVEL = 'ERROR,WARNING,INFO,LOG'; //also can be 0,1,2,3
|
|
4
|
-
|
|
5
3
|
const LEVELS = [
|
|
6
4
|
'ERROR',
|
|
7
5
|
'WARNING',
|
|
@@ -52,7 +50,7 @@ class LibLogger {
|
|
|
52
50
|
* setup logging levels
|
|
53
51
|
*/
|
|
54
52
|
_setupLevels() {
|
|
55
|
-
const logLevelsString = Urso.helper.parseGetParams('logLevel') ||
|
|
53
|
+
const logLevelsString = Urso.helper.parseGetParams('logLevel') || Urso.config.defaultLogLevel;
|
|
56
54
|
const logLevelsArray = logLevelsString.split(',');
|
|
57
55
|
|
|
58
56
|
for (const [index, level] of Object.entries(LEVELS)) {
|