Obscure account names in logs
This commit is contained in:
parent
59c3845d21
commit
0d93243b66
@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AudibleApi;
|
using AudibleApi;
|
||||||
using DataLayer;
|
using DataLayer;
|
||||||
|
using Dinah.Core;
|
||||||
using DtoImporterService;
|
using DtoImporterService;
|
||||||
using InternalUtilities;
|
using InternalUtilities;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@ -61,13 +62,13 @@ namespace ApplicationServices
|
|||||||
|
|
||||||
private static async Task<List<ImportItem>> scanAccountAsync(Api api, Account account)
|
private static async Task<List<ImportItem>> scanAccountAsync(Api api, Account account)
|
||||||
{
|
{
|
||||||
Dinah.Core.ArgumentValidator.EnsureNotNull(account, nameof(account));
|
ArgumentValidator.EnsureNotNull(account, nameof(account));
|
||||||
|
|
||||||
var localeName = account.Locale?.Name;
|
var localeName = account.Locale?.Name;
|
||||||
Log.Logger.Information("ImportLibraryAsync. {@DebugInfo}", new
|
Log.Logger.Information("ImportLibraryAsync. {@DebugInfo}", new
|
||||||
{
|
{
|
||||||
account.AccountName,
|
AccountName = account.AccountName.ToMask(),
|
||||||
account.AccountId,
|
AccountId = account.AccountId.ToMask(),
|
||||||
LocaleName = localeName,
|
LocaleName = localeName,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AudibleApi;
|
using AudibleApi;
|
||||||
using AudibleApiDTOs;
|
using AudibleApiDTOs;
|
||||||
|
using Dinah.Core;
|
||||||
using Polly;
|
using Polly;
|
||||||
using Polly.Retry;
|
using Polly.Retry;
|
||||||
|
|
||||||
@ -16,7 +17,7 @@ namespace InternalUtilities
|
|||||||
{
|
{
|
||||||
Serilog.Log.Logger.Information("GetApiAsync. {@DebugInfo}", new
|
Serilog.Log.Logger.Information("GetApiAsync. {@DebugInfo}", new
|
||||||
{
|
{
|
||||||
username,
|
Username = username.ToMask(),
|
||||||
LocaleName = localeName,
|
LocaleName = localeName,
|
||||||
});
|
});
|
||||||
return EzApiCreator.GetApiAsync(
|
return EzApiCreator.GetApiAsync(
|
||||||
@ -31,7 +32,7 @@ namespace InternalUtilities
|
|||||||
{
|
{
|
||||||
Serilog.Log.Logger.Information("GetApiAsync. {@DebugInfo}", new
|
Serilog.Log.Logger.Information("GetApiAsync. {@DebugInfo}", new
|
||||||
{
|
{
|
||||||
AccountId = account?.AccountId ?? "[empty]",
|
AccountId = account?.AccountId.ToMask() ?? "[empty]",
|
||||||
LocaleName = account?.Locale?.Name
|
LocaleName = account?.Locale?.Name
|
||||||
});
|
});
|
||||||
return EzApiCreator.GetApiAsync(
|
return EzApiCreator.GetApiAsync(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user