chore(backend): Switch console naar logger

Maak gebruik van custom logger
This commit is contained in:
Tibo De Peuter 2025-03-02 15:14:26 +01:00
parent f82668148c
commit c2e3886f3f
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
6 changed files with 29 additions and 13 deletions

View file

@ -4,6 +4,10 @@ import {
LearningPath,
LearningPathResponse,
} from '../interfaces/learningPath.js';
import { getLogger } from '../logging/initalize.js';
import { Logger } from 'winston';
const logger: Logger = getLogger();
export async function fetchLearningPaths(
hruids: string[],
@ -29,7 +33,7 @@ export async function fetchLearningPaths(
);
if (!learningPaths || learningPaths.length === 0) {
console.error(`⚠️ WARNING: No learning paths found for ${source}.`);
logger.error(`⚠️ WARNING: No learning paths found for ${source}.`);
return {
success: false,
source,