1、日志级别有3个,info,fatal,panic
2、 日志文件的输出
输出的结果 a.log
[Debug]main.go:45: debug info is ,check list ,hello
[Debug]main.go:46: debug info is ,check list ,hello000111
[Info]2020/09/09 Info check
标准输出:
[Info]2020/09/09 Info check stdout
样例二:
输出结果为:
[Info]2020/09/09 Check init info
[Info]2020/09/09 go to function Check
简介:
怎么使用
从上面的例子中我们分几步来看
当然本文没有介绍zap的其他基本用法,只是讲解了本人经常用到的方法,其他方法如果有时间,我也会一一列出。谢谢大家观看,比心~~