Would it be possible to add a method to the interface that only return the masked string ?
The main reason behind this is to leverage this attributes in other parts of an application.
For exemple we have this class
public class ResetPassword
{
[LogMasked]
public string Password { get; set; }
[LogMasked]
public string ConfirmPassword { get; set; }
}
If I log this object with serilog everyhting is fine.
What would be great is to be able to have the rendered string directly in order to use them in custom exception's message for exemple.