goolog
This library provides a function for initiating a fern Logger with some custom formatting and macros to simplify printing logs.
Features
timestamp-> This feature is activated by default. Deactivating this feature will cause the logger to skip printing timestamps, which can be useful when programming for an embedded system that does not support timestamps.esp-> This feature is intended to be used in conjunction with embedded development. To ensure developers can compile this library for these systems, this feature can not be used with any other feature. Therefore, you will also need to disable thedefault-features.
Example
To print log messages to the console and, if specified, to a file, this library internally uses the log and fern crates. But to simplify printing a custom sender name, one can also use these library macro`:
use *;
The code above will result in the following output:
# The timestamp (first two blocks) will only be shown when the `timestamp` feature is active,
# which is the default.
| | | |
But in reality, the log message will be formatted with color like this:
GREY | GREY | WHITE | * | WHITE
*:
DEBUG -> Blue
ERROR -> Red
INFO -> Green
TRACE -> White
WARN -> Yellow