fix: replace console.log/console.error with proper logging in monitoring and themes routes

- monitoring.js: Added log dependency, replaced console.log with log.warn
- themes.js: Added log dependency, replaced console.error with log.error
- src/app.js: Pass log to monitoringRoutes and themesRoutes

This fixes error messages being lost to stdout instead of proper log files.
This commit is contained in:
Krystie
2026-05-01 02:24:59 -07:00
parent ea5acfa9a2
commit 2f1e2107bc
3 changed files with 9 additions and 6 deletions

View File

@@ -359,7 +359,8 @@ async function createApp() {
apiRouter.use(monitoringRoutes({
resourceMonitor: ctx.resourceMonitor,
docker: ctx.docker,
asyncHandler: ctx.asyncHandler
asyncHandler: ctx.asyncHandler,
log: ctx.log
}));
apiRouter.use(updatesRoutes({
updateManager: ctx.updateManager,
@@ -420,7 +421,7 @@ async function createApp() {
asyncHandler: ctx.asyncHandler
}));
apiRouter.use('/recipes', recipesRoutes(ctx));
apiRouter.use(themesRoutes({ asyncHandler: ctx.asyncHandler }));
apiRouter.use(themesRoutes({ asyncHandler: ctx.asyncHandler, log: ctx.log }));
apiRouter.use('/docker', dockerResourcesRoutes({
docker: ctx.docker,
asyncHandler: ctx.asyncHandler