logger: add DefaultCallerSkipCount
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
5c9b3dae33
commit
af8d81f3c6
@ -8,6 +8,8 @@ var (
|
|||||||
DefaultLogger Logger = NewLogger()
|
DefaultLogger Logger = NewLogger()
|
||||||
// DefaultLevel used by logger
|
// DefaultLevel used by logger
|
||||||
DefaultLevel Level = InfoLevel
|
DefaultLevel Level = InfoLevel
|
||||||
|
// DefaultCallerSkipCount used by logger
|
||||||
|
DefaultCallerSkipCount = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
// Logger is a generic logging interface
|
// Logger is a generic logging interface
|
||||||
|
@ -33,7 +33,7 @@ func NewOptions(opts ...Option) Options {
|
|||||||
Level: DefaultLevel,
|
Level: DefaultLevel,
|
||||||
Fields: make(map[string]interface{}),
|
Fields: make(map[string]interface{}),
|
||||||
Out: os.Stderr,
|
Out: os.Stderr,
|
||||||
CallerSkipCount: 0,
|
CallerSkipCount: DefaultCallerSkipCount,
|
||||||
Context: context.Background(),
|
Context: context.Background(),
|
||||||
}
|
}
|
||||||
for _, o := range opts {
|
for _, o := range opts {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user