Vloggo

January 20, 2022 ยท View on GitHub

Logging module for V.

How to get?

v install https://github.com/cooperspencer/floggo

Usage

module main

import vloggo

fn main() {
	l := vloggo.new()
	l.info("hello")
	mut test := map[string]string
	test["hell"] = "yes"
	l.info_map("hello", test)

	// if you don't need all log levels
	ln := vloggo.new_min_level(vloggo.Level.error)
	ln.info("I am not here")
	ln.error("But I am")
}

Levels

pub enum Level {
	debug
	info
	warning
	error
	panic
}