Documentation ¶
Index ¶
Constants ¶
View Source
const ( LogFormatLogfmt = "logfmt" LogFormatJSON = "json" )
Variables ¶
This section is empty.
Functions ¶
func NewLogger ¶
NewLogger returns a log.Logger that prints in the provided format at the provided level with a UTC timestamp and the caller of the log entry. If non empty, the debug name is also appended as a field to all log lines. Panics if the log level is not error, warn, info or debug. Log level is expected to be validated before passed to this function.
Types ¶
type Flags ¶
type Flags struct { ConfigPath string `default:"parca.yaml" help:"Path to config file."` LogLevel string `default:"info" enum:"error,warn,info,debug" help:"log level."` Port string `default:":7070" help:"Port string for server"` CORSAllowedOrigins []string `help:"Allowed CORS origins."` OTLPAddress string `help:"OpenTelemetry collector address to send traces to."` StorageTSDBRetentionTime time.Duration `default:"6h" help:"How long to retain samples in storage."` StorageTSDBExpensiveMetrics bool `` /* 140-byte string literal not displayed */ SymbolizerDemangleMode string `` /* 159-byte string literal not displayed */ SymbolizerNumberOfTries int `default:"3" help:"Number of tries to attempt to symbolize an unsybolized location"` }
Click to show internal directories.
Click to hide internal directories.