Skip to content

Commit 1c82741

Browse files
committed
Update README file to Markdown 📃
1 parent 23def4e commit 1c82741

File tree

2 files changed

+36
-44
lines changed

2 files changed

+36
-44
lines changed

‎README

Lines changed: 0 additions & 44 deletions
This file was deleted.

‎README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# glog
2+
3+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/golang/glog)](https://pkg.go.dev/github.com/golang/glog)
4+
5+
Leveled execution logs for Go.
6+
7+
This is an efficient pure Go implementation of leveled logs in the
8+
manner of the open source C++ package [_glog_](https://github.com/google/glog).
9+
10+
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
11+
control over logging at the file level.
12+
13+
The comment from `glog.go` introduces the ideas:
14+
15+
Package _glog_ implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. It provides the functions Info, Warning, Error, Fatal, plus formatting variants such as Infof. It also provides V-style loggingcontrolled by the `-v` and `-vmodule=file=2` flags.
16+
17+
Basic examples:
18+
19+
```go
20+
glog.Info("Prepare to repel boarders")
21+
22+
glog.Fatalf("Initialization failed: %s", err)
23+
```
24+
25+
See the documentation for the V function for an explanation of these examples:
26+
27+
```go
28+
if glog.V(2) {
29+
glog.Info("Starting transaction...")
30+
}
31+
glog.V(2).Infoln("Processed", nItems, "elements")
32+
```
33+
34+
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.
35+
36+
Send bug reports to [email protected].

0 commit comments

Comments
 (0)