Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

ebiiim/logo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LOGO

GoDoc Build Status Go Report Card MIT license

ARCHIVED: It is recommended to use structured logging libraries.

What is this?

A simple logging library.

Usage

In your library:

var Log = logo.New(logo.INFO, nil)

func Hello(){
    Log.I("hello")
    fmt.Println("world")
}

In your app:

  1. No settings required!
func main(){
    lib.Hello()
}
// [INFO] hello
// world
  1. You can set the minimum log level to display.
  • DEBUG < INFO < WARNING < ERROR
func main(){
    lib.Log.Level = Logo.ERROR
    lib.Hello()
}
// world
  1. You can also set a custom label for each log level.
func main(){
    lib.Log.LogMessageMap[Logo.INFO] = "[情報] "
    lib.Hello()
}
// [情報] hello
// world

About

A simple logging library for Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages