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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user