用来作日志log输出的,

比较易懂。

今天周六啊,在公司加班学习一下呀。

package main

import (
	"log"
)

func init() {
	log.SetPrefix("TRACE: ")
	log.SetFlags(log.Ldate | log.Lmicroseconds | log.Llongfile)
}
	
func main() {
	log.Println("message")
	
	log.Fatalln("fatal message")
	
	log.Panicln("panic message")
}

  Go语言标准库之log包

相关文章:

  • 2021-06-11
  • 2022-02-07
  • 2021-10-18
  • 2021-12-24
  • 2022-01-21
  • 2022-03-06
  • 2021-06-05
  • 2022-02-28
猜你喜欢
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-01-31
相关资源
相似解决方案