Breeze.IO (Breeze v0.4.0)

Copy Markdown View Source

Logger-backed alternatives to IO.inspect/2 and IO.puts/1.

Alias this module in a view to route temporary debugging output through the Breeze logger collector instead of writing over the terminal UI:

alias Breeze.IO

IO.puts("mounted settings view")
IO.inspect(assigns, label: "assigns")

inspect/2 returns its input and accepts the usual inspect options. Pretty printing and IEx-style syntax colors are enabled by default. Either can be overridden with pretty: false or syntax_colors: [].

Summary

Functions

Pretty-prints a value to the logger and returns the value unchanged.

Pretty-prints a value to the logger and returns the value unchanged.

Writes chardata or a string-convertible value to the logger.

Writes a value to the logger.

Functions

inspect(value, opts \\ [])

@spec inspect(term(), keyword()) :: term()

Pretty-prints a value to the logger and returns the value unchanged.

inspect(device, value, opts)

@spec inspect(term(), term(), keyword()) :: term()

Pretty-prints a value to the logger and returns the value unchanged.

The device argument is accepted for compatibility with IO.inspect/3 and is ignored because output is routed to the logger.

puts(value)

@spec puts(term()) :: :ok

Writes chardata or a string-convertible value to the logger.

puts(device, value)

@spec puts(term(), term()) :: :ok

Writes a value to the logger.

The device argument is accepted for compatibility with IO.puts/2 and is ignored because output is routed to the logger.