package verbosity
import "k8s.io/klog/v2/internal/verbosity"
Index ¶
- type Level
- type VState
- func New() *VState
- func (vs *VState) Enabled(level Level, depth int) bool
- func (vs *VState) V() Value
- func (vs *VState) VModule() Value
- type Value
Types ¶
type Level ¶
type Level int32
Level must be an int32 to support atomic read/writes.
type VState ¶
type VState struct {
// contains filtered or unexported fields
}
VState contains settings and state. Some of its fields can be accessed through atomic read/writes, in other cases a mutex must be held.
func New ¶
func New() *VState
New returns a struct that implements -v and -vmodule support. Changing and checking these settings is thread-safe, with all concurrency issues handled internally.
func (*VState) Enabled ¶
Enabled checks whether logging is enabled at the given level. This must be called with depth=0 when the caller of enabled will do the logging and higher values when more stack levels need to be skipped.
The mutex will be locked only if needed.
func (*VState) V ¶
func (*VState) VModule ¶
type Value ¶
Value is an extension that makes it possible to use the values in pflag.
Source Files ¶
verbosity.go
- Version
- v2.100.1
- Published
- Apr 28, 2023
- Platform
- windows/amd64
- Imports
- 10 packages
- Last checked
- 4 hours ago –
Tools for package owners.