Skip to content

mediabakery/ratlog-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐀 ratlog-go

Application Logging for Rats, Humans and Machines

Go Report Card Go Doc Release

golang implementation of the ratlog spec

There are two way you can use ratlog.

var b bytes.Buffer
rlog := ratlog.New(&b)
rlog.Log(Props{message: test.Data.Message, tags: test.Data.Tags, fields: fields})
var b bytes.Buffer
rlog := ratlog.New(&b)
rlog.Message("Hello World").Fields("a": "1", "b": "2").Tag("debug", "error").Log()

You can provide a log instance with an additional tag

var b bytes.Buffer
rlog := ratlog.New(&b)
errorLog := rlog.Tag("error")
errorLog.Message("Hello World").Fields("a": "2", "b": "3").Tag("bla", "baz").Log()
// [error|debug|bla|baz] Hello World | a: 2 | b: 3

About

Application Logging for Rats, Humans and Machines – a golang implementation of the ratlog spec

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages