{{ .title.description }}
{{ .installation }}
{{ .quickStart.code}}
{{ .quickStart.description }}
There are some non context fields such as FunctionName which you can add to all logging requests
lambdazapper := New(lambdazap.ProcessNonContextFields(false)).With(lambdazap.FunctionName, lambdazap.FunctionVersion, lambdazap.AwsRequestID)
logger.With(lambdazapper.NonContextValues()...))
logger.Info("only non context values")
The above will log FunctionName and FunctionVersion but not RequestId.
The Non Context fields are
FunctionName
FunctionVersion
LogGroupName
LogStreamName
MemoryLimitInMB
Note by default all context and non context will be logged.
The option lambdazap.ProcessNonContextFields(false)
will NOT log non context values (e.g. FunctionName) when used like this
logger.Info("only context values. No FunctionName!", lambdazapper.ContextValues()...)
{{- range .examples }}
{{.}}
{{- end }}
go 1.x
{{- range .tests }}
{{.}}
{{- end }}
In the spirit of Uber's zap logger, zero allocations are used:
Type | Time | Objects Allocated |
---|---|---|
Non Context | ~150 ns/op | 0 allocs/op |
With Basic | ~400 ns/op | 0 allocs/op |
With All | ~733 ns/op | 0 allocs/op |
All PRs are welcome
- Douglas Chimento - {{.user}}
This project is licensed under the Apache License - see the LICENSE file for details