I have deployed a cloud function on GCP. The service account I am using for deploying my cloud function has the permission "Logs.writer". But still it gives me an error when I try to invoke that cloud function.
"error details: name = ErrorInfo reason = IAM_PERMISSION_DENIED domain = iam.googleapis.com metadata = map[permission:logging.logEntries.create]" timestamp: "2024-01-28T03:33:06.830860Z"
I am attaching bellow the the screenshot of the service account to confirm the permission for logging to GCP

But I dont know why dose it give the error. Please help.
I am trying to invoke the cloud function but it's giving me the logging permission error.
You have required permission for logging assuming you have set the correct project and service account. Below troubleshooting steps can help you to resolve your issue:
So try manually generating tokens by following this official document.