I create a scheduled function with Firebase. Deployed it. I do not know where I could see the log written in my function or at least the pubsub topics. This is the output of
firebase deploy
i deploying functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
! functions: missing required API cloudbuild.googleapis.com. Enabling now...
functions: required API cloudfunctions.googleapis.com is enabled
functions: required API cloudbuild.googleapis.com is enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (49.94 KB) for uploading
i functions: ensuring required API pubsub.googleapis.com is enabled...
i functions: ensuring required API cloudscheduler.googleapis.com is enabled...
functions: required API cloudscheduler.googleapis.com is enabled
functions: required API pubsub.googleapis.com is enabled
functions: functions folder uploaded successfully
i functions: creating Node.js 16 function addMessage(us-central1)...
i functions: creating Node.js 16 function scheduledFunction(us-central1)...
i functions: creating Node.js 16 function every10secs(us-central1)...
functions[addMessage(us-central1)] Successful create operation.
Since neither the emulator emulates scheduled function nor the firebase console displays the scheduled functions I am stuck. I assume I have to switch to the google cloud platform, but how?
CodePudding user response:
It's good to know that you were able to find PubSub inside GCP. The reason is because FireBase tools share some products with Google Cloud Platform. I'm leaving this answer as step by step guide and reference for other users that may encounter this issue.
PUBSUB on Google Cloud Platform
To access PUBSUB:
- Go to Navegation Menu on Google Cloud Platform.
- Scroll until you reach BIGDATA > PUB/SUB, click on it.
- Success! the PUB/SUB page will load with its options.
Note: You can 'pin' your most used products in the Navigation Menu. For more details about the PUBSUB, click here.
Logs on Google Cloud Platform
To see operation logs:
- Go to Navegation Menu on Google Cloud Platform.
- Scroll until you reach OPERATIONAL > Logging, click on it.
- Success! the Logging page will load and you will be able to see logs of your different google products.
Note: Logs will need to be streamed into the log explorer first. Logging will suggest jobs to do this operation automatically. For more details about the Logging, click here.