Closed sturlath closed 6 years ago
Hi! Thanks for the suggestion.
How about...
[LogMasked]
// -> "*****"
[LogMasked(Text="####")]
// -> "####"
[LogMasked(Text="####", ShowFirst=5)]
// -> "12345####"
[LogMasked(ShowFirst=4, ShowLast=4)]
// -> "1234*****5678"
?
My pleasure! Yes this is much better.
Would you then also include
[LogMasked(Text="####", ShowLast=4)] // -> "####5678"
@sturlath yes, I think the idea would be for any combination of ShowFirst
, Text
and ShowLast
to work 👍
Hi better late than never.
I have a local commit with all this stuff we talked about. I have no experience with doing a pull request but I when I try to Push to dev I get this
Remote: Permission to destructurama/attributed.git denied to sturlath.
So I gather I just don´t have the rights. Right? Can you give them to me or can I somehow get you the updates for you to review?
The Git noob
Great! :-)
You'll need to create your own fork in order to send the PR; the docs here have links to all the necessary info: https://help.github.com/articles/creating-a-pull-request/
Let me know if you need a hand. Cheers!
Implemented in #16.
Have you any thoughts on extending the attribute to take in string so you could rather log *** instead of "not logged".
[NotLogged(Text= "***")]
Also I would like to be able to choose to not just override all but just part of the message. Like e.g in card numbers you can save first 4 and last 4. It would be great to be able to choose starting index and length
Something like [NotLogged(Char='*',Start=3, End=14)]
Just brainstorming here..