mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 10:02:47 -05:00
Add logging to tokenables (#2298)
* Add logging to token usages * Add settings manipulation of log levels * Maintain no logging for dev * Log exception causing Token failure in TryUnprotect * dotnet format 🤖 * Added deconstruction operator on new debug logs. * Split off log level settings into separate files * Improve log messages * dotnet format 🤖 * Fix token serialization * Final review notes Co-authored-by: Todd Martin <>
This commit is contained in:
@ -12,6 +12,7 @@ using Bit.Core.Settings;
|
||||
using Bit.Core.Tokens;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Bit.Core.OrganizationFeatures;
|
||||
|
||||
@ -70,7 +71,8 @@ public static class OrganizationServiceCollectionExtensions
|
||||
new DataProtectorTokenFactory<OrganizationSponsorshipOfferTokenable>(
|
||||
OrganizationSponsorshipOfferTokenable.ClearTextPrefix,
|
||||
OrganizationSponsorshipOfferTokenable.DataProtectorPurpose,
|
||||
serviceProvider.GetDataProtectionProvider())
|
||||
serviceProvider.GetDataProtectionProvider(),
|
||||
serviceProvider.GetRequiredService<ILogger<DataProtectorTokenFactory<OrganizationSponsorshipOfferTokenable>>>())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user