serilog-contrib / Serilog.Enrichers.Sensitive

A Serilog LogEvent enricher that masks sensitive data
MIT License
111 stars 23 forks source link

Feature Request: Provide a method of allowing a custom mask value #6

Closed dammitjanet closed 1 year ago

dammitjanet commented 2 years ago

The code as is uses a constant string as the value to replace when masking. This looks a little odd when masking shorter values.

const string MaskValue - "***MASK***"

Can we have an alternative way of providing a different MaskValue for example:

  1. Providing a single character to use repeatedly for all masked values when would mandate a different masking methodology
  2. Provide an optional MaskValue in the enricher constructor
sandermvanvliet commented 1 year ago

@dammitjanet apologies for not replying to this sooner, it turns out I didn't configure the notifications on this repo correctly...

I've implemented this in 8833067a846758210791f7e1295468e0d2bf0bb1 and it should land on NuGet soon as version 1.1.0.0.

sandermvanvliet commented 1 year ago

The new version is now available on NuGet