feat: 新增 Console 和 reflect 部分完善 command
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
21
src/main/resources/core/console.js
Normal file
21
src/main/resources/core/console.js
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 控制台输出类
|
||||
*/
|
||||
/*global base*/
|
||||
var log = base.getLog().static;
|
||||
var Level = Java.type('java.util.logging.Level');
|
||||
var console = {
|
||||
log: function () {
|
||||
log.i(arguments.join(' '));
|
||||
},
|
||||
warn: function () {
|
||||
log.w(arguments.join(' '));
|
||||
},
|
||||
error: function () {
|
||||
log.log(Level.SEVERE, arguments.join(' '));
|
||||
},
|
||||
debug: function () {
|
||||
log.d(arguments.join(' '));
|
||||
}
|
||||
};
|
||||
global.console = console;
|
Reference in New Issue
Block a user