Skip to content

luotianyi-dev/go-tylog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TyLog

TyLog is Tianyi Network's custom logger package.

See go.dev for detailed documentation.

Installation

Run the following command to install the package:

go get github.com/luotianyi-dev/go-tylog

Usage

Basic Logging

import (
	"github.com/luotianyi-dev/go-tylog"
)

func main() {
	tylog.Log.Tag("app").Inff("msg: %s", "Hello, world!")
}

Custom Logger

import (
	"github.com/luotianyi-dev/go-tylog"
)

func main() {
	logger := tylog.New(os.Stdout)
	logger.MinLevel = tylog.LevelWrn
	logger.AddTagColor("http", tylog.ColorYellow)
	logger.Tag("http").Wrnf("Server started on: %s", "localhost:8080")
}

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages