package promlog
import "github.com/prometheus/common/promlog"
Package promlog defines standardised ways to initialize Go kit loggers across Prometheus components. It should typically only ever be imported by main packages.
Index ¶
Functions ¶
func New ¶
New returns a new leveled oklog logger. Each logged line will be annotated with a timestamp. The output always goes to stderr.
Types ¶
type AllowedFormat ¶
type AllowedFormat struct {
// contains filtered or unexported fields
}
AllowedFormat is a settable identifier for the output format that the logger can have.
func (*AllowedFormat) Set ¶
func (f *AllowedFormat) Set(s string) error
Set updates the value of the allowed format.
func (*AllowedFormat) String ¶
func (f *AllowedFormat) String() string
type AllowedLevel ¶
type AllowedLevel struct {
// contains filtered or unexported fields
}
AllowedLevel is a settable identifier for the minimum level a log entry must be have.
func (*AllowedLevel) Set ¶
func (l *AllowedLevel) Set(s string) error
Set updates the value of the allowed level.
func (*AllowedLevel) String ¶
func (l *AllowedLevel) String() string
type Config ¶
type Config struct { Level *AllowedLevel Format *AllowedFormat }
Config is a struct containing configurable settings for the logger
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
promlog/flag |
- Version
- v0.4.1
- Published
- May 16, 2019
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 1 hour ago –
Tools for package owners.