Hi,
I created a service account with stack driver admin permissions. (admin: in order to remove permissions noice)
Downloaded the json file. and created the following config
var json = File.ReadAllText("google.json");
var config = new GoogleCloudLoggingSinkOptions {
ProjectId = "prj-2496077",
UseJsonOutput = true,
GoogleCredentialJson = json,
LogName = "LogName",
UseSourceContextAsLogName = true
};
var log = new LoggerConfiguration().Enrich.FromLogContext()
.WriteTo.GoogleCloudLogging(sinkOptions: config).Destructure.JsonNetTypes().CreateLogger();
the self log indicates:
2020-04-05T05:42:57.3170296Z Exception while emitting periodic batch from Serilog.Sinks.GoogleCloudLogging.GoogleCloudLoggingSink: Grpc.Core.RpcException: Status(StatusCode=PermissionDenied, Detail="The caller does not have permission")
at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass0_0`2.<<WithRetry>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Serilog.Sinks.GoogleCloudLogging.GoogleCloudLoggingSink.EmitBatchAsync(IEnumerable`1 events)
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick()
Hi, I created a service account with stack driver admin permissions. (admin: in order to remove permissions noice) Downloaded the json file. and created the following config
the self log indicates:
What am I missing? whats wrong with my config?
Thanks