chore(backend): Switch console naar logger
Maak gebruik van custom logger
This commit is contained in:
parent
f82668148c
commit
c2e3886f3f
6 changed files with 29 additions and 13 deletions
|
@ -5,6 +5,7 @@ import {
|
|||
fetchLearningPaths,
|
||||
searchLearningPaths,
|
||||
} from '../services/learningPaths.js';
|
||||
import { getLogger } from '../logging/initalize.js';
|
||||
/**
|
||||
* Fetch learning paths based on query parameters.
|
||||
*/
|
||||
|
@ -56,7 +57,7 @@ export async function getLearningPaths(
|
|||
);
|
||||
res.json(learningPaths.data);
|
||||
} catch (error) {
|
||||
console.error('❌ Unexpected error fetching learning paths:', error);
|
||||
getLogger().error('❌ Unexpected error fetching learning paths:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue