LoggerJSON.Formatter.RedactorEncoder (logger_json v7.0.3)

View Source

Summary

Functions

Takes a term and makes sure that it can be encoded by the encoder without errors and without leaking sensitive information.

Types

redactor()

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

Functions

encode(atom, redactors)

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

Takes a term and makes sure that it can be encoded by the encoder 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 if encoder is Jason
everything elseusing inspect/2unchanged