fix(server): default to log `fcc` namespaces, unless env set (#48143)

pull/48178/head
Shaun Hamilton 2022-10-21 18:23:04 +01:00 committed by GitHub
parent 8ea0401c0a
commit 326e00fab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 6 deletions

View File

@ -21,7 +21,7 @@
"scripts": {
"babel-dev-server": "babel-node --inspect=0.0.0.0 ./src/server/index.js",
"build": "babel src --out-dir lib --ignore '/**/*.test.js' --copy-files --no-copy-ignored",
"develop": "cross-env DEBUG=fcc* node src/development-start.js",
"develop": "node src/development-start.js",
"start": "cross-env DEBUG=fcc* node lib/production-start.js"
},
"resolutions": {

View File

@ -34,7 +34,7 @@ nodemon({
watch: path.resolve(__dirname, './server'),
spawn: true,
env: {
DEBUG: 'fcc*'
DEBUG: `fcc*,${process.env.DEBUG}`
}
});

View File

@ -14,10 +14,6 @@ const { setupPassport } = require('./component-passport');
const log = createDebugger('fcc:server');
const reqLogFormat = ':date[iso] :status :method :response-time ms - :url';
// force logger to always output
// this may be brittle
log.enabled = true;
if (sentry.dsn === 'dsn_from_sentry_dashboard') {
log('Sentry reporting disabled unless DSN is provided.');
} else {