logs

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 12 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 ApplicationQuery

func ApplicationQuery(name, project string) string

func BuildQuery

func BuildQuery(name, project string) string

func BuildsOfAppQuery added in v1.2.7

func BuildsOfAppQuery(name, project string) string

func KongVars added in v1.8.4

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 added in v1.19.0

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 added in v1.19.0

func (cmd *LogsCmd) BeforeApply(writer io.Writer) error

BeforeApply initializes Writer from Kong's bound io.Writer.

func (*LogsCmd) Run added in v1.19.0

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