From 5d5f5660b4020650b68b79ccf3860d3fb0bf98a9 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Wed, 24 Jul 2024 01:52:07 -0400 Subject: [PATCH] feat: add options to disable winston and devwatch --- src/backend/src/SelfHostedModule.js | 2 ++ src/backend/src/services/runtime-analysis/LogService.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/backend/src/SelfHostedModule.js b/src/backend/src/SelfHostedModule.js index 0e21c196..bc4a5183 100644 --- a/src/backend/src/SelfHostedModule.js +++ b/src/backend/src/SelfHostedModule.js @@ -34,6 +34,8 @@ class SelfHostedModule extends AdvancedBase { const DevWatcherService = require('./services/DevWatcherService'); const path_ = require('path'); + + if ( ! config.no_devwatch ) services.registerService('__dev-watcher', DevWatcherService, { root: path_.resolve(__dirname, '../../../'), commands: [ diff --git a/src/backend/src/services/runtime-analysis/LogService.js b/src/backend/src/services/runtime-analysis/LogService.js index 8566513b..860b29a1 100644 --- a/src/backend/src/services/runtime-analysis/LogService.js +++ b/src/backend/src/services/runtime-analysis/LogService.js @@ -339,6 +339,7 @@ class LogService extends BaseService { let logger; + if ( ! config.no_winston ) logger = new WinstonLogger( winston.createLogger({ levels: WINSTON_LEVELS,