mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
Update code to log to Azure Cosmos DB (#1624)
* Update code to log to Azure Cosmos DB using latest SDK.
This commit is contained in:
@ -63,8 +63,9 @@ namespace Bit.Core.Utilities
|
||||
if (CoreHelpers.SettingHasValue(globalSettings?.DocumentDb.Uri) &&
|
||||
CoreHelpers.SettingHasValue(globalSettings?.DocumentDb.Key))
|
||||
{
|
||||
config.WriteTo.AzureDocumentDB(new Uri(globalSettings.DocumentDb.Uri),
|
||||
globalSettings.DocumentDb.Key, timeToLive: TimeSpan.FromDays(7))
|
||||
config.WriteTo.AzureCosmosDB(new Uri(globalSettings.DocumentDb.Uri),
|
||||
globalSettings.DocumentDb.Key, timeToLive: TimeSpan.FromDays(7),
|
||||
partitionKey: "_partitionKey")
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithProperty("Project", globalSettings.ProjectName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user