View Source Absinthe.Logger (absinthe v1.7.8)

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.

Note that filtering only applies to GraphQL variables - the query itself is logged before any parsing happens.

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.

Summary

Functions

Log a document being processed.

Functions

@spec 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.