Skip to content

Commit

Permalink
Also omit emitting a request log in CLOUD_RUN environments
Browse files Browse the repository at this point in the history
  • Loading branch information
fpbouchard committed May 6, 2022
1 parent babd2a1 commit 0a175ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/middleware/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export async function middleware(
// will nest under. GAE and GCF generate the parent request logs
// automatically.
let emitRequestLog;
if (env !== GCPEnv.APP_ENGINE && env !== GCPEnv.CLOUD_FUNCTIONS) {
if (
env !== GCPEnv.APP_ENGINE &&
env !== GCPEnv.CLOUD_FUNCTIONS &&
env !== GCPEnv.CLOUD_RUN
) {
const loggingBunyanReq = new LoggingBunyan(options);
const requestLogger = bunyan.createLogger({
name: options.logName!,
Expand Down

0 comments on commit 0a175ad

Please sign in to comment.