Fix potential nullpo

This commit is contained in:
ME1312 2021-12-01 06:00:41 -05:00
parent 508c2f7627
commit 7d9f4f86d3
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
2 changed files with 3 additions and 1 deletions

View File

@ -132,6 +132,7 @@ public class InternalSubLogger extends SubLogger {
} }
} }
// Log to FILTER
log(level, msg); log(level, msg);
// Log to FILE // Log to FILE

View File

@ -141,7 +141,6 @@ public class SubLoggerImpl {
} }
} }
Process process = this.process; Process process = this.process;
if (level == null) level = logger.info;
if (out == null) (out = new Thread(() -> start(process.getInputStream(), false), SubAPI.getInstance().getAppInfo().getName() + "::Log_Spooler(" + name + ')')).start(); if (out == null) (out = new Thread(() -> start(process.getInputStream(), false), SubAPI.getInstance().getAppInfo().getName() + "::Log_Spooler(" + name + ')')).start();
if (err == null) (err = new Thread(() -> start(process.getErrorStream(), true), SubAPI.getInstance().getAppInfo().getName() + "::Error_Spooler(" + name + ')')).start(); if (err == null) (err = new Thread(() -> start(process.getErrorStream(), true), SubAPI.getInstance().getAppInfo().getName() + "::Error_Spooler(" + name + ')')).start();
} }
@ -207,6 +206,8 @@ public class SubLoggerImpl {
default: default:
level = logger.info; level = logger.info;
} }
} else if (level == null) {
level = logger.info;
} }
// Log to FILTER // Log to FILTER