Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonOptions ¶
type CommonOptions struct {
LogOptions
GrpcMaxMsgSize int `` /* 146-byte string literal not displayed */
}
CommonOptions contains common flags for all commands
type GrpcLogrus ¶
GrpcLogrus implements grpclog.LoggerV2 interface using logrus logger
func (GrpcLogrus) V ¶
func (lw GrpcLogrus) V(l int) bool
V reports whether verbosity level l is at least the requested verbose level.
type LogOptions ¶
type LogOptions struct {
LogLevel string `long:"log-level" env:"LOG_LEVEL" default:"info" description:"Logging level (info, debug, warning or error)"`
LogFormat string `long:"log-format" env:"LOG_FORMAT" description:"log format (text or json), defaults to text on a terminal and json otherwise"`
LogFields string `long:"log-fields" env:"LOG_FIELDS" description:"default fields for the logger, specified in json"`
LogForceFormat bool `long:"log-force-format" env:"LOG_FORCE_FORMAT" description:"ignore if it is running on a terminal or not"`
Verbose bool `long:"verbose" short:"v" description:"enable verbose logging"`
}
LogOptions defines logging flags. It is meant to be embedded in a command struct.
Click to show internal directories.
Click to hide internal directories.