logs

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package logs provides commands to retrieve and tail logs from deplo.io resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KongVars

func KongVars() kong.Vars

KongVars returns all variables which are used in the logs commands

Types

type Cmd

type Cmd struct {
	Applications applicationCmd `cmd:"" group:"deplo.io" name:"application" aliases:"app,application" help:"Get deplo.io Application logs."`
	Builds       buildCmd       `cmd:"" group:"deplo.io" name:"build" help:"Get deplo.io Build logs."`
}

type LogsCmd

type LogsCmd struct {
	format.Writer `kong:"-"`
	Follow        bool          `help:"Follow the logs by live tailing." short:"f"`
	Lines         int           `help:"Amount of lines to output." default:"50" short:"l"`
	Since         time.Duration `help:"Duration how long to look back for logs." short:"s" default:"${log_retention}"`
	From          time.Time     `help:"Ignore since flag and start looking for logs at this absolute time (RFC3339)." placeholder:"2025-01-01T14:00:00+01:00"`
	To            time.Time     `help:"Ignore since flag and stop looking for logs at this absolute time (RFC3339)." placeholder:"2025-01-01T15:00:00+01:00"`
	Output        string        `help:"Configures the log output format. ${enum}" short:"o" enum:"default,json" default:"default"`
	NoLabels      bool          `help:"Disable labels in log output."`
	// contains filtered or unexported fields
}

LogsCmd is the shared base for the logs sub-commands.

It has to be exported so that Kong initializes the embedded format.Writer, see format.Writer.BeforeApply.

func (*LogsCmd) BeforeApply

func (cmd *LogsCmd) BeforeApply(streams format.IOStreams) error

BeforeApply initializes Writer from the bound format.IOStreams.

func (*LogsCmd) Run

func (cmd *LogsCmd) Run(
	ctx context.Context,
	client *api.Client,
	queryString string,
	labels ...string,
) error

Jump to

Keyboard shortcuts

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