feature/IO-3029-Enhanced-Logging-File-Based: Add fix bugs

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-11-13 13:09:37 -08:00
parent f3d8aa3438
commit cba2da8da7
2 changed files with 9 additions and 1 deletions

View File

@@ -191,7 +191,13 @@ const createLogger = () => {
return false;
};
if (upload || checkAndUploadLog()) return;
// Upload log immediately if upload is true, otherwise check the log size.
if (upload) {
uploadLogToS3(logEntry, message, type, user);
return;
}
if (checkAndUploadLog()) return;
winstonLogger.log(logEntry);
};