feat: add system level

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-01 02:41:00 +08:00
parent 57926ba788
commit 46925f9b52
2 changed files with 33 additions and 20 deletions

View File

@ -17,9 +17,12 @@ var global = this;
global.debug = true;
}
if (java.nio.file.Files.exists(java.nio.file.Paths.get(root, "debug"))) {
logger.info('Running debugging mode...');
logger.info('Running in debug mode...');
global.debug = true;
global.trace = true;
}
if (java.nio.file.Files.exists(java.nio.file.Paths.get(root, "level"))) {
global.level = base.read(java.nio.file.Paths.get(root, "level"))
logger.info('Set system level to [' + global.level + ']...');
}
// Check Class Loader, Sometimes Server will can't find plugin.yml file
loader = checkClassLoader();