Skip to content

Commit 2330e45

Browse files
authored
Check LOGGING env-var for "true" (#78)
LOGGING env var should be exlicitly set to "true", in order to log requests. Currently it just needs to be truethy, which doesn't correspond with the the current default value in the example .env.local file (where it's "false"). Explicit "true" is also how other env-vars are checked, eg https://github.com/microsoft/code-push-server/blob/08e97d751620ad7867bb0c9b94633e94f2c01c68/api/script/default-server.ts#L110
1 parent 08e97d7 commit 2330e45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/script/default-server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export function start(done: (err?: any, server?: express.Express, storage?: Stor
9090
next();
9191
});
9292

93-
if (process.env.LOGGING) {
93+
if (process.env.LOGGING === "true") {
9494
app.use((req: express.Request, res: express.Response, next: (err?: any) => void): any => {
9595
console.log(); // Newline to mark new request
9696
console.log(`[REST] Received ${req.method} request at ${req.originalUrl}`);

0 commit comments

Comments
 (0)