logs

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flags

func Flags(options *Options) *pflag.FlagSet

func Tail

func Tail(tail string) (int, error)

Types

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

Formatter handles formatting and printing of log entries with dynamic column alignment.

func NewFormatter

func NewFormatter(machineNames, serviceNames []string, utc bool) *Formatter

func (*Formatter) PrintEntry

func (f *Formatter) PrintEntry(entry api.ServiceLogEntry)

PrintEntry prints a single log entry with proper formatting.

type Options

type Options struct {
	Files    []string
	Follow   bool
	Tail     string
	Since    string
	Until    string
	UTC      bool
	Machines []string
}

Options describes how and what logs we are requesting.

type ServiceArg

type ServiceArg struct {
	Service    string
	Containers []string
}

ServiceArg pairs a service name with the list of container filters parsed from `uc service logs` arguments. An empty Containers slice means "stream logs from all containers of this service".

func ParseServiceArgs

func ParseServiceArgs(args []string) ([]ServiceArg, error)

ParseServiceArgs groups raw `uc service logs` positional arguments into per-service entries, preserving first-seen order. Each argument is either a service name (e.g. "web") or a service/container reference (e.g. "web/61d57fd3428f"). Arguments for the same service are merged: if any argument for a service lacks a container suffix, all containers of that service are streamed regardless of any other service/container arguments for it.

Jump to

Keyboard shortcuts

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