Documentation
¶
Overview ¶
Package actionlog shows the records of an action's process, those the action logs and those go-plugin logs of running it, as the verbose output of a step is laid out, with the secrets of the run hidden.
Index ¶
- func Level(verbose, trace bool) hclog.Level
- type Logger
- func (l *Logger) Debug(msg string, args ...any)
- func (l *Logger) Error(msg string, args ...any)
- func (l *Logger) GetLevel() hclog.Level
- func (l *Logger) ImpliedArgs() []any
- func (l *Logger) Info(msg string, args ...any)
- func (l *Logger) IsDebug() bool
- func (l *Logger) IsError() bool
- func (l *Logger) IsInfo() bool
- func (l *Logger) IsTrace() bool
- func (l *Logger) IsWarn() bool
- func (l *Logger) Log(level hclog.Level, msg string, args ...any)
- func (l *Logger) Name() string
- func (l *Logger) Named(name string) hclog.Logger
- func (l *Logger) ResetNamed(name string) hclog.Logger
- func (l *Logger) SetLevel(level hclog.Level)
- func (l *Logger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (l *Logger) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (l *Logger) Trace(msg string, args ...any)
- func (l *Logger) Warn(msg string, args ...any)
- func (l *Logger) With(args ...any) hclog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the log the records of an action's process are shown through: those the action logs, and those go-plugin logs of starting, calling and stopping the process, which come at trace level. Each is written as the verbose output of a step is, its level first and then the action it is of, with its fields under it as YAML-like lines, as the request and the response are:
[DEBUG] ./my-action: retrying the request [DEBUG] attempt: 2 [DEBUG] headers: [DEBUG] Accept: */*
Secrets are hidden in what it writes.
func New ¶
New returns the log of the action name, which writes the records at level and above to out, hiding the secrets masker knows. Records at error level are written only when verbose is set.
func (*Logger) ImpliedArgs ¶
func (*Logger) StandardLogger ¶
func (l *Logger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
func (*Logger) StandardWriter ¶
func (l *Logger) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
StandardWriter returns a writer that logs each line written to it, at the level opts forces, or at info level.