- Increase account privacy in logs
- Improve book download retry
This commit is contained in:
parent
f9849abb7b
commit
1812fc2c7c
5 changed files with 11 additions and 8 deletions
|
|
@ -93,5 +93,11 @@ namespace InternalUtilities
|
|||
}
|
||||
|
||||
public override string ToString() => $"{AccountId} - {Locale?.Name ?? "[empty]"}";
|
||||
|
||||
public string MaskedLogEntry => @$"AccountId={mask(AccountId)}|AccountName={mask(AccountName)}|Locale={Locale?.Name ?? "[empty]"}";
|
||||
private static string mask(string str)
|
||||
=> str is null ? "[null]"
|
||||
: str == string.Empty ? "[empty]"
|
||||
: str.ToMask();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace InternalUtilities
|
|||
{
|
||||
Serilog.Log.Logger.Information("GetApiAsync. {@DebugInfo}", new
|
||||
{
|
||||
AccountId = account?.AccountId.ToMask() ?? "[empty]",
|
||||
Account = account?.MaskedLogEntry ?? "[null]",
|
||||
LocaleName = account?.Locale?.Name
|
||||
});
|
||||
return EzApiCreator.GetApiAsync(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue