MCPcopy Create free account
hub / github.com/prometheus/common / Set

Method Set

promlog/log.go:98–106  ·  view source on GitHub ↗

Set updates the value of the allowed format.

(s string)

Source from the content-addressed store, hash-verified

96
97// Set updates the value of the allowed format.
98func (f *AllowedFormat) Set(s string) error {
99 switch s {
100 case "logfmt", "json":
101 f.s = s
102 default:
103 return fmt.Errorf("unrecognized log format %q", s)
104 }
105 return nil
106}
107
108// Config is a struct containing configurable settings for the logger
109type Config struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected