Skip to content
/ log Public

Support Formatter discard level, time, debug entry name.

License

Notifications You must be signed in to change notification settings

mycaosf/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log

Simple log support stdout, file, syslog

Examples

package main

import (
	"github.com/mycaosf/log"
)

func main() {
	//log, err := log.New(log.LogTypeSyslog, log.LogLevelDebug, "simple")
	log, err := log.New(log.LogTypeStdoutColor, log.LogLevelDebug, "simple")
	if err == nil {
		defer log.Close()
		log.Debugf("debug message: %d", 1)
		log.Infof("info message: %d", 1)
		log.Errorf("error message: %d", 1)
		log.Fatalf("fatalf message: %d", 1)
	}
}

About

Support Formatter discard level, time, debug entry name.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages