Reviewed-on: #14 Co-authored-by: andrey <andrey@4devs.io> Co-committed-by: andrey <andrey@4devs.io>
This commit was merged in pull request #14.
This commit is contained in:
@@ -2,14 +2,15 @@ package log_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
|
||||
"gitoa.ru/go-4devs/log"
|
||||
"gitoa.ru/go-4devs/log/level"
|
||||
)
|
||||
|
||||
func ExampleDebug() {
|
||||
logger := log.With(log.New(log.WithStdout()),
|
||||
log.WithSource(2),
|
||||
logger := log.New(log.WithStdout()).With(
|
||||
log.WithSource(2, filepath.Base),
|
||||
log.WithLevel(log.KeyLevel, level.Debug),
|
||||
log.WithExit(level.Alert),
|
||||
log.WithPanic(level.Emergency),
|
||||
@@ -20,5 +21,5 @@ func ExampleDebug() {
|
||||
ctx := context.Background()
|
||||
log.Debug(ctx, "debug message")
|
||||
// Output:
|
||||
// msg="debug message" source=global_example_test.go:21 level=debug
|
||||
// msg="debug message" source=global_example_test.go:22 level=debug
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user