actionlog

package
v1.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Level

func Level(verbose, trace bool) hclog.Level

Level returns the level an action's records are shown at: warn, debug in a verbose run, and trace in one that also shows how the runner runs the action's process.

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

func New(name string, out io.Writer, masker *mask.Masker, level hclog.Level, verbose bool) *Logger

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) Debug

func (l *Logger) Debug(msg string, args ...any)

func (*Logger) Error

func (l *Logger) Error(msg string, args ...any)

func (*Logger) GetLevel

func (l *Logger) GetLevel() hclog.Level

func (*Logger) ImpliedArgs

func (l *Logger) ImpliedArgs() []any

func (*Logger) Info

func (l *Logger) Info(msg string, args ...any)

func (*Logger) IsDebug

func (l *Logger) IsDebug() bool

func (*Logger) IsError

func (l *Logger) IsError() bool

func (*Logger) IsInfo

func (l *Logger) IsInfo() bool

func (*Logger) IsTrace

func (l *Logger) IsTrace() bool

func (*Logger) IsWarn

func (l *Logger) IsWarn() bool

func (*Logger) Log

func (l *Logger) Log(level hclog.Level, msg string, args ...any)

func (*Logger) Name

func (l *Logger) Name() string

func (*Logger) Named

func (l *Logger) Named(name string) hclog.Logger

func (*Logger) ResetNamed

func (l *Logger) ResetNamed(name string) hclog.Logger

func (*Logger) SetLevel

func (l *Logger) SetLevel(level hclog.Level)

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.

func (*Logger) Trace

func (l *Logger) Trace(msg string, args ...any)

func (*Logger) Warn

func (l *Logger) Warn(msg string, args ...any)

func (*Logger) With

func (l *Logger) With(args ...any) hclog.Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL