1- # Clog
1+ # Clog
22
33[ ![ GitHub Workflow Status] ( https://img.shields.io/github/workflow/status/go-clog/clog/Go?logo=github&style=for-the-badge )] ( https://github.com/go-clog/clog/actions?query=workflow%3AGo )
44[ ![ codecov] ( https://img.shields.io/codecov/c/github/go-clog/clog/master?logo=codecov&style=for-the-badge )] ( https://codecov.io/gh/go-clog/clog )
@@ -13,10 +13,10 @@ This package supports multiple loggers across different levels of logging. It us
1313
1414## Installation
1515
16- The minimum requirement of Go is ** 1.11 ** .
16+ The minimum requirement of Go is ** 1.19 ** .
1717
1818 go get unknwon.dev/clog/v2
19-
19+
2020Please apply ` -u ` flag to update in the future.
2121
2222## Getting Started
@@ -51,7 +51,7 @@ The code inside `init` function is equivalent to the following:
5151
5252``` go
5353func init () {
54- err := log.NewConsole (0 ,
54+ err := log.NewConsole (0 ,
5555 log.ConsoleConfig {
5656 Level: log.LevelTrace ,
5757 },
@@ -66,7 +66,7 @@ Or expand further:
6666
6767``` go
6868func init () {
69- err := log.NewConsoleWithName (log.DefaultConsoleName , 0 ,
69+ err := log.NewConsoleWithName (log.DefaultConsoleName , 0 ,
7070 log.ConsoleConfig {
7171 Level: log.LevelTrace ,
7272 },
@@ -85,7 +85,7 @@ In production, you may want to make log less verbose and be asynchronous:
8585
8686``` go
8787func init () {
88- // The buffer size mainly depends on number of logs could be produced at the same time,
88+ // The buffer size mainly depends on number of logs could be produced at the same time,
8989 // 100 is a good default.
9090 err := log.NewConsole (100 ,
9191 log.ConsoleConfig {
@@ -145,7 +145,7 @@ func main() {
145145
146146### Caller Location
147147
148- When using ` log.Error ` and ` log.Fatal ` functions, the caller location is written along with logs.
148+ When using ` log.Error ` and ` log.Fatal ` functions, the caller location is written along with logs.
149149
150150``` go
151151func main () {
@@ -171,10 +171,10 @@ File logger is the single most powerful builtin logger, it has the ability to ro
171171
172172``` go
173173func init () {
174- err := log.NewFile (100 ,
174+ err := log.NewFile (100 ,
175175 log.FileConfig {
176176 Level: log.LevelInfo ,
177- Filename: " clog.log" ,
177+ Filename: " clog.log" ,
178178 FileRotationConfig: log.FileRotationConfig {
179179 Rotate: true ,
180180 Daily: true ,
0 commit comments