Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 421 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 421 Bytes

bulog

simple logger with golang

example

func TestNewLog(t *testing.T) {
	log := New(os.Stdout)

	log.Info().Msg("hello world")
	log.Debug().Msg("hello world")
	log.Warn().Msg("hello world")
	log.Error().Msg("hello world")
}

output

{"level":"info","message":"hello world"}
{"level":"debug","message":"hello world"}
{"level":"warn","message":"hello world"}
{"level":"error","message":"hello world"}