Documentation
¶
Index ¶
- func ApplyLoggerFlags(cmd *cobra.Command, args []string)
- func Context(ctx context.Context, logger *log.Logger) context.Context
- func CreateStyle() *log.Styles
- func Debug(ctx context.Context, msg any, keyvals ...any)
- func Debugf(ctx context.Context, format string, args ...any)
- func Default() *log.Logger
- func Error(ctx context.Context, msg any, keyvals ...any)
- func Errorf(ctx context.Context, format string, args ...any)
- func From(ctx context.Context) *log.Logger
- func FromPrefix(ctx context.Context, prefix string) *log.Logger
- func Info(ctx context.Context, msg any, keyvals ...any)
- func Infof(ctx context.Context, format string, args ...any)
- func Level() log.Level
- func LoggerFlags(pflags *pflag.FlagSet)
- func Warn(ctx context.Context, msg any, keyvals ...any)
- func Warnf(ctx context.Context, format string, args ...any)
- func With(ctx context.Context, keyvals ...any) *log.Logger
- func WithPrefix(ctx context.Context, prefix string) *log.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyLoggerFlags ¶
ApplyLoggerFlags configures the logger based on command line flags.
func CreateStyle ¶
CreateStyle creates and returns custom log styles.
func FromPrefix ¶
FromPrefix returns the possible injected logger in the context, adding the given prefix
func LoggerFlags ¶
LoggerFlags adds logger-related flags to the given flag set.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.