Flect.Logger

Provides logging facilities for the various Flect tools.

If the :flect_event_pid application configuration key is set for the :flect application, log messages will be sent as {:flect_stdout, msg} (where msg is a binary) to that PID instead of being printed to standard output.

Note also that if :flect_event_pid is set, the current terminal is not ANSI-compatible, or the FLECT_COLORS environment variable is set to 0, colored output will be disabled.

Source

Functions summary

Functions

debug(str)

Prints a debug message if the FLECT_DEBUG environment variable is set to 1. Colorized as magenta. Returns :ok.

str must be a binary containing the message.

Source

error(str)

Prints an error message. Colorized as red. Returns :ok.

str must be a binary containing the message.

Source

info(str)

Prints an informational message. Returns :ok.

str must be a binary containing the message.

Source

log(str)

Prints a log message. Colorized as cyan. Returns :ok.

str must be a binary containing the message.

Source

note(str)

Prints a notification message. Colorized as green. Returns :ok.

str must be a binary containing the message.

Source

warn(str)

Prints a warning message. Colorized as yellow. Returns :ok.

str must be a binary containing the message.

Source