Skip to content

Commit 1605b2f

Browse files
gravitujo
authored andcommitted
Check LOGGING env-var for "true" (microsoft#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 1605b2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/script/default-server.ts

Lines changed: 1 addition & 1 deletion
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)