Crate hw_msg

Source
Expand description

This crate provides macros for the style of CLI messages I like to use in my programs.

The base macros are:

  • info - Print an info-styled message
  • warning - Print a warning-styled message
  • error - Print an error-styled message
  • question - Print a question-styled message
  • debug - Print a debug-styled message

These macros will print the message without a trailing newline, like how print does. Use the *ln variants of each of these macros to get println-like functionality (i.e. infoln).

The *_fmt variants work like the base macros, but return the string instead of printing it.

Macros§

debug
debug_fmt
debugln
error
error_fmt
errorln
info
info_fmt
infoln
question
question_fmt
warning
warning_fmt
warningln

Structs§

HwLoggerlogging
This struct allows you to use the log crate’s macros instead of the ones provided by this crate.