logging
Configuration for the Erlang logger.
gleam add logging
import logging.{Info}
pub fn main() {
// Run this once at the start of your program
logging.configure()
// And get logging!
logging.log(Info, "Hello, Joe!")
}
Disabling the colored output
When using some logger services, colored output can be superfluous, because
they’re not processed at all, and appears as real characters. You can set
the NO_COLOUR
or NO_COLOR
environment variable to any string that is not
"false"
or the empty string to disable the colored output from the logger.
Further documentation can be found at https://hexdocs.pm/logging.