Skip to content
This repository was archived by the owner on Apr 18, 2022. It is now read-only.
This repository was 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

@natrajankan

Description

@natrajankan

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));`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions