JSON.Logger (json v1.4.1) View Source

Exposes separate log level configuration so developers can set logging verbosity for json library

To configure log level only for json library, add following line in config file

use Mix.Config
# to make json be very verbose
config :json, log_level: :debug
# to make json be silent
config :json, log_level: :error

Link to this section Summary

Functions

Logs given message to logger at given log level

Link to this section Functions

Specs

allowed_levels() :: [Logger.level()]
Link to this macro

log(level, message)

View Source (macro)

Logs given message to logger at given log level

Supported log levels are:

  • :debug - All messages are logged
  • :info - only :info, :warn and :error messages are logged
  • :warn - only :warn and :error messages are logged
  • :error - only :error messages are logged