glog

Package Version Hex Docs

A Gleam implementation of Erlang logger inspired from Logrus API.

Task List

Usage

 import glog.{Glog}
 import glog/field
 import glog/arg

 let logger: Glog = glog.new()
 
 // Set recommended default config
 glog.set_default_config()
 
 // Add value and a field to log
 // Print Info with template
 logger
 |> add("foo", "bar")
 |> add_field(field.new("woo", "zoo"))
 |> infof("I'll be ~p", [arg.new("back")])

Quick start

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

Installation

This package can be added to your Gleam project:

gleam add glog

and its documentation can be found at https://hexdocs.pm/glog.

Search Document