1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-18 08:00:59 -05:00

[PM-6167] Remove cosmos logging sink (#3769)

* get rid of cosmos logging sink

* remove logs from layout

* delete log models

* remove logs_view permission

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
Kyle Spearrin
2024-02-08 13:35:45 -05:00
committed by GitHub
parent 6cc53b4739
commit 3e73f1cb4a
12 changed files with 10 additions and 336 deletions

View File

@ -60,16 +60,7 @@ public static class LoggerFactoryExtensions
.Enrich.FromLogContext()
.Filter.ByIncludingOnly(inclusionPredicate);
if (CoreHelpers.SettingHasValue(globalSettings?.DocumentDb.Uri) &&
CoreHelpers.SettingHasValue(globalSettings?.DocumentDb.Key))
{
config.WriteTo.AzureCosmosDB(new Uri(globalSettings.DocumentDb.Uri),
globalSettings.DocumentDb.Key, timeToLive: TimeSpan.FromDays(7),
partitionKey: "_partitionKey")
.Enrich.FromLogContext()
.Enrich.WithProperty("Project", globalSettings.ProjectName);
}
else if (CoreHelpers.SettingHasValue(globalSettings?.Sentry.Dsn))
if (CoreHelpers.SettingHasValue(globalSettings?.Sentry.Dsn))
{
config.WriteTo.Sentry(globalSettings.Sentry.Dsn)
.Enrich.FromLogContext()