Skip to content

extract ObscureSensitiveParams function #4

Description

@alessandroargentieri

Now you can enable or disable the ObscureSensitiveData functionality whose check is applied to all log records when enabled.
It slows down the execution time even when you log a simple record.
Extract and make ObscureSensitiveParam public, in order to give the possibility to choose to disable the functionality and using it only when needed.
This could be done this way:

log.SetConfig{ &log.Configs{
         ObscureSensitiveData: log.Disable,
         SensitiveParams: []string{"password"},
     }
}

And then:

log.Info(log.ObscureSensitiveData(myrecord))

This way the feature remains disabled by default but used only when needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions