absinthe v1.4.16 Absinthe.Logger View Source

Handles logging of Absinthe-specific events.

Variable filtering

Absinthe can filter out sensitive information like tokens and passwords during logging. They are replaced by "[FILTERED]".

Use the :filter_variables configuration setting for this module. For example:

config :absinthe, Absinthe.Logger,
  filter_variables: ["token", "password", "secret"]

With the configuration above, Absinthe will filter any variable whose name includes the terms token, password, or secret. The match is case sensitive.

The default is ["token", "password"].

Pipeline display

Absinthe can optionally display the list of pipeline phases for each processed document when logging. To enable this feature, set the :pipeline configuration option for this module:

config :absinthe, Absinthe.Logger,
  pipeline: true

The default is false.

Disabling

To disable Absinthe logging, set the :log configuration option to false:

config :absinthe,
  log: false

The default is true.

Link to this section Summary

Functions

Log a document being processed

Link to this section Functions

Link to this function log_run(level, arg) View Source
log_run(
  level :: Logger.level(),
  {doc :: Absinthe.Pipeline.data_t(), schema :: Absinthe.Schema.t(),
   pipeline :: Absinthe.Pipeline.t(), opts :: Keyword.t()}
) :: :ok

Log a document being processed.