Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
SetDebug(bool)
SetLogFile(string)
Debug(string, ...any)
Error(string, ...any)
Warn(string, ...any)
Info(string, ...any)
Fatal(string, ...any)
Panic(string, ...any)
Debugf(string, ...any)
Errorf(string, ...any)
Warnf(string, ...any)
Infof(string, ...any)
Fatalf(string, ...any)
Panicf(string, ...any)
WithFields(Fields) Logger
}
Logging structure.
To use,
1) Create a logger:
```go
lgr := logger.NewLogger()
```
2) Do things with it:
```go
lgr.Warn("Not enough coffee!")
lgr.Info("Water is heating up.")
// and so on.
```
If an empty string is passed to `NewLogger`, then the log facility will display messages on standard output.
func NewZapLoggerWithFile ¶ added in v0.4.0
Create a new logger with the given log file.
Click to show internal directories.
Click to hide internal directories.