Closed fgaravaglia closed 1 year ago
Try using the Serilog SelfLog output to see if there are any exceptions being thrown:
https://github.com/serilog/serilog/wiki/Debugging-and-Diagnostics
I tried to enable selfLog. This is the issue I found int cloud Logging:
`
[SERILOG-SELFLOG] 2023-01-30T22:06:39.6647916Z Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: Grpc.Core.RpcException: Status(StatusCode="PermissionDenied", Detail="Permission 'logging.logEntries.create' denied on resource (or it may not exist).")
at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass0_0`2.<
`
That error is telling you the problem: "Permission 'logging.logEntries.create' denied on resource (or it may not exist)."
Please read the authentication section of the readme: https://github.com/manigandham/serilog-sinks-googlecloudlogging#authentication
You need to use the correct service account and make sure it has permissions to write logs. Add the Logs Writer
role to your service account being used by the application.
the strange thing is tath it is working without changing anything. I assigned now the role to Cloud Run service Account and it works as expected. Thanks for your support
From application deployed last time on Middle December, no log entry has been found now, no error founds in CLoud Logging
the configuration has not been changed so far: