-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
36 lines (36 loc) · 1.42 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Package logg is a golang library for providing logging functions
// with more effectively, friendly programmatic API.
//
// logg/slog is an opt-in copy from log/slog. Different with originals,
// logg has more verbs and features and colored text outputting
// with out-of-the-box. Have a see at https://github.com/hedzr/logg.
//
// To use this logging library, import it as:
//
// import "github.com/hedzr/logg/slog"
//
// var logger = slog.New("my-app").SetLevel(slog.Debug).SetJSONMode()
// logger.Info("info message here", "attr1", 3, "attr2", false, "attr3", "text details")
// logger.Println() // just an empty line
// logger.Println("text message", attrs...)
// logger.Print("text message", attrs...)
// logger.Debug("debug message", attrs...)
// logger.Trace("trace message", attrs...)
// logger.Warn("warn message", attrs...)
// logger.Error("error message", attrs...)
// logger.Fatal("fatal message", attrs...)
// logger.Panic("panic message", attrs...)
// logger.OK("ok message", attrs...)
// logger.Success("success message", attrs...)
// logger.Fail("fail message", attrs...)
// logger.Verbose("verbose message", attrs...) // only work for build tag 'verbose' defined
//
// var subl = logger.New("child1").Set(attrs...)
// subl.Debug("debug")
//
// For more detail, please take a look at:
//
// - https://github.com/hedzr/logg
// - https://pkg.go.dev/github.com/hedzr/logg
// - https://deps.dev/go/github.com%2Fhedzr%2Flogg
package logg