'no logs firebase function

EDIT: Turns out firebase function filtering is broken on the UI. E.G. If I select the function, no logs show. But I can see logs if I turn off the filter and view all logs

I have a simple firebase function running at host/printLog

Here is my function implementation

exports.printLog = functions.https.onRequest((request, response) => {
    functions.logger.log("hhellooooo");
    response.send("okie dokie").status(200).end();
})

When I send a request to the URL, I get the response "okie dokie", so I know the functions is running, but no log messages.

 % curl host/printLog
okie dokie

I don't get any logs, even the innovation logs generated by firebase when the function starts and stops. I am still getting logs for some of my other functions, but some of other functions aren't generating logs either



Solution 1:[1]

I tried to reproduce the issue that you are receiving with the logs.

I deployed the function that you have provided in your question

const admin = require('firebase-admin');
admin.initializeApp();
 
// Max height and width of the thumbnail in pixels.
exports.printLog = functions.https.onRequest((request, response) => {
 functions.logger.log("hhellooooo");
 response.send("okie dokie").status(200).end();
})

I sent a request to the URL, and in the logs I am receiving the hhellooooo, and even when I filter according to the name of the Function, it’s working fine as shown in the below screenshot.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zeenath S N