Serving Function... logs in GCP
i have noticed that when deploying my function, the Serving Function... console output shows in GCP logs:
i would expect that message if I'm running functions-framework locally, but i would not expect it inside GCP... why does this extra come up? is there a way to suppress it?
here's my deploy command, in case i am doing something irregular:
gcloud alpha functions deploy my-func --gen2 --no-allow-unauthenticated --env-vars-file .env.yaml --runtime nodejs20 --region us-central1 --trigger-http --memory 4GB --entry-point entry --source ./dist/myapp/
I have the opposite issue, I would like to see logs while running it locally 😒 how did you make it do it?
i'm mystified; i've only ever seen this on my local; never on cloud logger.
fwiw, i found the answer:
https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/28b1c300240771720f70a95522ede7ce6a2ccea0/src/main.ts#L63
turns out it was environment variables. (when its not DNS, it's environment variables)
if NODE_ENV is set to production (exactly) you don't see the localhost message. should have just looked at the source code 🙈