LyricTian / logger

A simple log library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logger

A simple log library

License ReportCard GoDoc

Get

go get github.com/LyricTian/logger

Usage

package main

import (
	"github.com/LyricTian/logger"
)

func main() {
	log := logger.NewStdLogger(true, true, true, true, logger.TimeFlag)
	log.Debugf("hello,%s", "world")
	log.Tracef("hello,%s", "world")
	log.Infof("hello,%s", "world")
	log.Errorf("hello,%s", "world")
	log.Fatalf("hello,%s", "world")
}

Features

  • Based on the standard library log
  • Support output to the console and file

MIT License

Copyright (c) 2017 LyricTian

About

A simple log library

License:MIT License


Languages

Language:Go 100.0%