Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Logs are not getting written into User Created Cosmos DB / Container #88

Open
natrajankan opened this issue Oct 25, 2021 · 0 comments
Open

Comments

@natrajankan
Copy link

Serilog logs into Diagnostics DB / Logs container. But when i try to change into cosmosdb which i created, its not logging anything, please advise. If i dont specify cosmosdb and container name, the logs are getting created in Diagnostics DB / Logs container. But if i include my cosmos db and my container, no logs are written into the cosms db which i created

class Starup : FunctionStartup
{
public override void Configure(IFunctionHostBuilder builder)
{
var logger = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.AzureDocumentDB("https://myendpoint.documents.azure.com:443/", "mykey", "mycosmosdb", "mycontainer")
.CreateLogger();
builder.Services.AddLogging(lb => lb.AddSerilog(logger));`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant