View Source LoggerJSON.Formatter.RedactorEncoder (logger_json v6.2.1)

Summary

Functions

Takes a term and makes sure that it can be encoded by Jason.encode!/1 without errors and without leaking sensitive information.

Types

@type redactor() :: {redactor :: module(), redactor_opts :: term()}

Functions

@spec encode(term(), redactors :: [redactor()]) :: term()

Takes a term and makes sure that it can be encoded by Jason.encode!/1 without errors and without leaking sensitive information.

Encoding rules

TypeEncodingRedaction
boolean()unchangedunchanged
map()unchangedvalues are redacted
list()unchangedunchanged
tuple()converted to listunchanged
binary()unchanged if printable, otherwise using inspect/2unchanged
number()unchangedunchanged
atom()unchangedunchanged
struct()converted to mapvalues are redacted
keyword()converted to mapvalues are redacted
%Jason.Fragment{}unchangedunchanged
everything elseusing inspect/2unchanged