artificery v0.2.0 Artificery.Console

A minimal logger

Link to this section Summary

Functions

Updates the logger configuration with the given options

Prints a debug message, only visible when verbose mode is on

Prints an error message, and then halts the process

Prints an info message

Initializes the logger configuration

Prints a notice

Provides a spinner while some long-running work is being done

Prints a success message

Prints a warning message

Gets the current width of the terminal in columns

Link to this section Functions

Link to this function configure(opts)
configure(Keyword.t()) :: Keyword.t()

Updates the logger configuration with the given options.

Link to this function debug(msg)
debug(String.t()) :: :ok

Prints a debug message, only visible when verbose mode is on

Link to this function error(msg)
error(String.t()) :: no_return()

Prints an error message, and then halts the process

Link to this function info(msg)
info(String.t()) :: :ok

Prints an info message

Link to this function init()
init() :: :ok

Initializes the logger configuration

Link to this function notice(msg)
notice(String.t()) :: :ok

Prints a notice

Link to this macro spinner(msg, opts \\ [], list) (macro)

Provides a spinner while some long-running work is being done.

Options

  • spinner: one of the spinners defined in Artificery.Console.Spinner

Example

Console.spinner "Loading...", [spinner: :simple_dots] do
  :timer.sleep(5_000)
end
Link to this function success(msg)
success(String.t()) :: :ok

Prints a success message

Link to this function warn(msg)
warn(String.t()) :: :ok

Prints a warning message

Gets the current width of the terminal in columns