Skip to content

Commit 0e02b07

Browse files
committed
Debug - Remove logs I dont exploit properly
1 parent 110a76d commit 0e02b07

3 files changed

Lines changed: 0 additions & 8 deletions

File tree

src/libs/middleware/authIOT.middleware.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ export class UnkownApiKeyError extends ApiKeyError {
7676
// this livemode control whether or not we enforce the API keys validation
7777
const livemode = true;
7878
export const validateAPIKeyHeader = async (req: Request, _res: Response, next: NextFunction) => {
79-
const dataStr = JSON.stringify({ path: req.path });
80-
slog.log('debug', 'validateAPIKeyHeader', { dataStr });
8179
const authHeader = req.headers.authorization;
8280

8381
let error;

src/libs/middleware/logging.middleware.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { LoggableContext, slog } from '../modules/logging/index.js';
55
import { config } from '../../packages/config/index.js';
66

77
export const loggingHandler = async (req: Request, res: Response, next: NextFunction) => {
8-
const dataStr = JSON.stringify({ path: req.path });
9-
slog.log('debug', 'loggingHandler', { dataStr });
108
const path = req.path;
119
const remoteIp = req.socket.remoteAddress ?? 'N/A';
1210
const cfRay = req.get('cf-ray') ?? 'N/A';

src/libs/routes/homeTracker/upload.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ import {
66
sensorRawDataInputSchema,
77
updateSensorLastSyncDate
88
} from '../../modules/homeTracker/index.js';
9-
import { slog } from '../../modules/logging/index.js';
109

1110
const handler: RouteHandler<Input> = async (params) => {
12-
slog.log('debug', 'Starting hometracker upload', { sensorName: params.input.sensorName });
1311
params.loggableContext.addData('sensorName', params.input.sensorName);
1412
params.loggableContext.addData('dataStr', JSON.stringify(params.input));
1513

1614
await updateSensorLastSyncDate({ sensorName: params.input.sensorName });
17-
slog.log('debug', 'After updateSensorLastSyncDate', { sensorName: params.input.sensorName });
1815
// Don't await for data ingestion to avoid keeping the sensor up for too long
1916
// I think it should make tests flaky but it doesn't seem to be the case. Not sure why.
2017
ingestSensorData(params.input);
21-
slog.log('debug', 'After ingestSensorData', { sensorName: params.input.sensorName });
2218

2319
const instructSleepSec = await getSensorSleepTimeSec({ sensorName: params.input.sensorName });
2420
params.loggableContext.addData('instructSleepSec', instructSleepSec);

0 commit comments

Comments
 (0)