Simple configurable logging tool
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Dan Ballard 3093e3fae4 fix go/mod name pirms 1 mēnesi
LICENSE import libricochet-go log as stand alone repo pirms 1 mēnesi
README.md import libricochet-go log as stand alone repo pirms 1 mēnesi
go.mod fix go/mod name pirms 1 mēnesi
log.go import libricochet-go log as stand alone repo pirms 1 mēnesi

README.md

log

A simple log primative Open Privacy uses

Examples:

log.AddEverythingFromPattern("connectivity")
log.SetLevel(log.LevelDebug)
log.ExcludeFromPattern("connection/connection")
log.ExcludeFromPattern("outbound/3dhauthchannel")

log.Debugf("Creating the thing with param %v\n", param)
log.Infoln("Doing thing X")
log.Warnf("This might be bad: %v\n", err)
log.Errorf("Failed to do thing: %v\n", err)

Making log go to a file

if runtime.GOOS == "windows" {
	filelogger, err := log.NewFile(log.LevelInfo, "cwtch_log.txt")
	if err == nil {
		log.SetStd(filelogger)
	}
}