View Source ExAequoColors.Ui (ExAequoColors v0.1.1)
Some convenience methods to output colorized messages
Summary
Functions
The error function, by default
Just issuing an information
The warning function, by default
Functions
The error function, by default
iex(3)> capture_io(fn -> error("OH NO") end) "\e[31m\e[1mERROR: \e[0mOH NO\n"
or to a different device
iex(4)> capture_io(:stderr, fn -> error("OH NO", device: :stderr) end) "\e[31m\e[1mERROR: \e[0mOH NO\n"
changing the label?
iex(5)> capture_io(fn -> error("OH NO", label: "BAD") end) "\e[31m\e[1mBAD\e[0mOH NO\n"
Just issuing an information
iex(1)> capture_io(fn -> info("hello") end) "\e[34mINFO: \e[0mhello\n"
And you can also color the message
iex(2)> capture_io(fn -> info("hello", color: :blue) end) "\e[34mINFO: \e[0m\e[34mhello\e[0m\n"
The warning function, by default
iex(6)> capture_io(fn -> warning("Watch out!") end) "\e[33m\e[1mWARNING: \e[0mWatch out!\n"