mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-09-30 12:57:28 -05:00
refactor: Use LOG_ERROR for error logging for timestamps
This commit is contained in:
@@ -3,6 +3,7 @@ import subdomain from 'express-subdomain';
|
||||
import { getTaskFile } from '@/database';
|
||||
import { getCDNFileStream } from '@/util';
|
||||
import { Stream } from 'node:stream';
|
||||
import { LOG_ERROR } from '@/logger';
|
||||
|
||||
const npdl = express.Router();
|
||||
|
||||
@@ -41,7 +42,7 @@ npdl.get([
|
||||
|
||||
Stream.pipeline(readStream, response, (err) => {
|
||||
if (err) {
|
||||
console.error('Error with response stream: ', err.message);
|
||||
LOG_ERROR('Error with response stream: ' + err.message);
|
||||
response.end();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ import { GetUserFriendPIDsResponse } from '@pretendonetwork/grpc/friends/get_use
|
||||
import { config, disabledFeatures } from '@/config-manager';
|
||||
import { NodeJsClient } from '@smithy/types';
|
||||
import { Response } from 'express';
|
||||
import { LOG_ERROR } from '@/logger';
|
||||
|
||||
let s3: NodeJsClient<S3Client>;
|
||||
|
||||
@@ -68,7 +69,7 @@ export function fileErrCallback(response: Response) {
|
||||
if (!response.headersSent) {
|
||||
response.status(500).send('Server Error');
|
||||
}
|
||||
console.error('Error in sending file: ', err);
|
||||
LOG_ERROR('Error in sending file: ' + err.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user