Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't see any invocation logs in GCP Cloud Function

When running GCP Cloud Function, I don't see any logs in the console. I do see only function has been updated logs but I expect to see also function invocation logs and my function internal logs.

I tied several options and all end up with the same outcome:

  1. Python3.8 - gen1
  2. Python3.8 - gen1
  3. Node - gen1
  4. Node - gen2

For all the gen2, there were no logs also at CloudRun log console.

The code for node it is simply the default with console.info:

const functions = require('@google-cloud/functions-framework');

functions.http('helloHttp', (req, res) => {
 console.info("hello from gen2")       
 res.send(`Hello ${req.query.name || req.body.name || 'World'}!`);
});

the logs from the console There are only logs regarding the Update and not from the function itself.

I see some posts about this issue has been resolved, but it I face it again.

Thanks all

like image 714
LeonBam Avatar asked Sep 17 '25 11:09

LeonBam


1 Answers

I wasn't aware that there was a logging sink filtering in my project. There is an option to send logs only from specific services. At my case, Functions wasn't included.

like image 102
LeonBam Avatar answered Sep 19 '25 07:09

LeonBam