KubeJS

KubeJS

69M Downloads

Debug uses wrong log level

rlnt opened this issue ยท 0 comments

commented

I tested around with some console functions like this:

console.setDebugEnabled(true);
console.log('log test');
console.info('info test');
console.warn('warn test');
console.error('error test');
console.debug('debug test');

This is the output in the KubeJS log:

[22:07:07] [INFO] server_scripts:core/events.js:5: log test
[22:07:07] [INFO] server_scripts:core/events.js:6: info test
[22:07:07] [WARN] server_scripts:core/events.js:7: warn test
[22:07:07] [ERR ] server_scripts:core/events.js:8: error test
[22:07:07] [INFO] server_scripts:core/events.js:9: debug test

Seems like console.log is just an alias for console.info which is fine.
But console.debug also seems to be an alias for console.info which makes no sense since you need to run console.setDebugEnabled(true) before it even does something. It should be logged to [DEBUG] and not [INFO] since you have to manually activate it.

Minecraft: 1.16.5
Forge: 36.1.32
KubeJS: 1605.3.11-build.31
Architectury: 1.10.27
Rhino: 1605.1.1-build.21