glimpse_log
A minimal gleam logging library that helps you get a glimpse into the program. Contains bindings to JavaScript and a gleam implementation for everywhere else.
gleam add glimpse_log@1
import glimpse
pub fn main() {
// You can call this on any value that can be converted to a StringBuilder via string.inspect()
glimpse.error("An error log")
glimpse.warn("A warning log")
glimpse.info("An info log")
glimpse.debug("A debug log")
// The functions return the term passed into them, so they can be used in pipes!
"A value"
|> glimpse.error
|> glimpse.warn
|> glimpse.info
|> glimpse.debug
4
|> glimpse.info
}
Further documentation can be found at https://hexdocs.pm/glimpse_log.
Development
TODO
- Tests
- Docs
gleam run # Run the project
gleam test # Run the tests