基于 `zap` 包封装。除了实现 `Go` 日志包的基本功能外,还实现了很多高级功能 本包基于`github.com/tkestack/tke/pkg/util/log`裁剪
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
423 B

2 years ago
  1. // Copyright 2020 Lingfei Kong <colin404@foxmail.com>. All rights reserved.
  2. // Use of this source code is governed by a MIT style
  3. // license that can be found in the LICENSE file.
  4. package main
  5. import (
  6. "cynking.com/pkg/log"
  7. )
  8. func main() {
  9. defer log.Flush()
  10. log.V(0).Info("This is a V level message")
  11. log.V(0).Infow("This is a V level message with fields", "X-Request-ID", "7a7b9f24-4cae-4b2a-9464-69088b45b904")
  12. }