Documentation ¶
Overview ¶
Package logopts is used for CLI options used to control the logging, globally or for a dedicated context. If used the main program should call logopts.CloseLogFiles() before exiting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Description = `` /* 1379-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type ConfigFragment ¶
type ConfigFragment struct { LogLevel string `json:"logLevel,omitempty"` LogConfig string `json:"logConfig,omitempty"` LogKeys []string `json:"logKeys,omitempty"` Json bool `json:"json,omitempty"` // LogFileName is a CLI option, only. Do not serialize and forward LogFileName string `json:"-"` }
ConfigFragment is a serializable log config used for CLI commands.
func (*ConfigFragment) AddFlags ¶
func (c *ConfigFragment) AddFlags(fs *pflag.FlagSet)
func (*ConfigFragment) Evaluate ¶
func (c *ConfigFragment) Evaluate(ctx ocm.Context, logctx logging.Context, main bool) (*EvaluatedOptions, error)
func (*ConfigFragment) GetLogConfig ¶
func (c *ConfigFragment) GetLogConfig(fss ...vfs.FileSystem) (*config.Config, error)
type EvaluatedOptions ¶
type EvaluatedOptions struct { LogForward *config.Config LogFile *loggingopt.LogFile }
func (*EvaluatedOptions) Close ¶
func (o *EvaluatedOptions) Close() error
type Options ¶
type Options struct { ConfigFragment *EvaluatedOptions }
Click to show internal directories.
Click to hide internal directories.