Closed juchom closed 7 months ago
This issue was marked as stale since it has not been active for a long time
Would it be possible to add a method to the interface that only return the masked string ?
What interface?
If I understand correctly you need LogMaskedAttribute.FormatMaskedValue
to be public.
new LogMaskedAttribute { ShowFirst = 3 }.GetMaskedValue("abcdef")
Hello,
To be honest, I don't remember what was my exact use case when I opened this issue.
But I was probably trying to have the properties rendered like it is in Serilog.
Probably an extension method like ToLoggingString()
that applies the same transformation.
Do you still need such API?
I don't need it anymore right now.
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
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.