You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
249 B
16 lines
249 B
4 years ago
|
# Log
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
### Structured logging
|
||
|
|
||
|
```
|
||
|
logger := stdlog.NewLogger(stdlog.Writer(os.Stdout))
|
||
|
log := log.NewHelper("module_name", logger)
|
||
|
// Levels
|
||
|
log.Info("some log")
|
||
|
log.Infof("format %s", "some log")
|
||
|
log.Infow("field_name", "some log")
|
||
|
```
|
||
|
|