TyLog is Tianyi Network's custom logger package.
See go.dev for detailed documentation.
Run the following command to install the package:
go get github.com/luotianyi-dev/go-tylog
import (
"github.com/luotianyi-dev/go-tylog"
)
func main() {
tylog.Log.Tag("app").Inff("msg: %s", "Hello, world!")
}
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")
}
This project is licensed under the MIT License.