glog

Leveled execution logs for Go

  • 所有者: golang/glog
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

glog

Leveled execution logs for Go.

This is an efficient pure Go implementation of leveled logs in the
manner of the open source C++ package
https://github.com/google/glog

By binding methods to booleans it is possible to use the log package
without paying the expense of evaluating the arguments to the log.
Through the -vmodule flag, the package also provides fine-grained
control over logging at the file level.

The comment from glog.go introduces the ideas:

Package glog implements logging analogous to the Google-internal
C++ INFO/ERROR/V setup.  It provides functions Info, Warning,
Error, Fatal, plus formatting variants such as Infof. It
also provides V-style logging controlled by the -v and
-vmodule=file=2 flags.

Basic examples:

	glog.Info("Prepare to repel boarders")

	glog.Fatalf("Initialization failed: %s", err)

See the documentation for the V function for an explanation
of these examples:

	if glog.V(2) {
		glog.Info("Starting transaction...")
	}

	glog.V(2).Infoln("Processed", nItems, "elements")

The repository contains an open source version of the log package
used inside Google. The master copy of the source lives inside
Google, not here. The code in this repo is for export only and is not itself
under development. Feature requests will be ignored.

Send bug reports to golang-nuts@googlegroups.com.

主要指标

概览
名称与所有者golang/glog
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2013-07-16 04:33:04
推送于2025-04-29 08:47:46
最后一次提交2025-04-29 10:43:26
发布数10
最新版本名称v1.2.5 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数3.6k
关注者数92
派生数0.9k
提交数44
已启用问题?
问题数0
打开的问题数0
拉请求数17
打开的拉请求数2
关闭的拉请求数56
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?