Closed bakbuz closed 5 months ago
Hi guys
I have a tiny question. Can I read a value from another node?
Is it possible?
Example:
{ "ConnectionStrings": { "MongoDB": "mongodb+srv://BLABLABLABLA" }, "Serilog": { "MinimumLevel": { "Default": "Information", "Override": { "Microsoft": "Error", "System": "Warning" } }, "Enrich": [ "FromLogContext" ], "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.MongoDB" ], "WriteTo": [ { "Name": "Console" }, { "Name": "MongoDB", "Args": { "databaseUrl": "ConnectionStrings:MongoDB", "collectionName": "system_logs", "cappedMaxSizeMb": "1024", "cappedMaxDocuments": "50000", "rollingInterval": "Month" } } ] } }
Look at this line: "databaseUrl": "ConnectionStrings:MongoDB",
"databaseUrl": "ConnectionStrings:MongoDB",
Hi! No, that isn't possible currently - it's not likely we'd support it directly here in Serilog, but you might find some other options if you dig around in Microsoft.Extensions.Configuration. HTH!
Hi guys
I have a tiny question. Can I read a value from another node?
Is it possible?
Example:
Look at this line:
"databaseUrl": "ConnectionStrings:MongoDB",