logs

package
v0.0.0-...-460b374 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func IsLogrusError

func IsLogrusError(message string) bool

func NewTermLogger

func NewTermLogger(t *term.Term) *slog.Logger

Types

type DiscardFormatter

type DiscardFormatter struct{}

func (DiscardFormatter) Format

func (DiscardFormatter) Format(entry *logrus.Entry) ([]byte, error)

type ErrInvalidLogType

type ErrInvalidLogType struct {
	Value string
}

func (ErrInvalidLogType) Error

func (e ErrInvalidLogType) Error() string

type FirelensMessage

type FirelensMessage struct {
	Log               string `json:"log"`
	ContainerID       string `json:"container_id,omitempty"`
	ContainerName     string `json:"container_name,omitempty"`
	Source            Source `json:"source,omitempty"`              // "stdout" or "stderr"
	EcsTaskDefinition string `json:"ecs_task_definition,omitempty"` // ECS metadata
	EcsTaskArn        string `json:"ecs_task_arn,omitempty"`        // ECS metadata
	EcsCluster        string `json:"ecs_cluster,omitempty"`         // ECS metadata
	Etag              string `json:"etag,omitempty"`                // added by us
	Host              string `json:"host,omitempty"`                // added by us
	Service           string `json:"service,omitempty"`             // added by us
}

type LogType

type LogType uint32
const (
	LogTypeRun LogType
	LogTypeBuild
	LogTypeUnspecified LogType = 0
	LogTypeAll         LogType = 0xFFFFFFFF
)

func ParseLogType

func ParseLogType(value string) (LogType, error)

func (LogType) Has

func (c LogType) Has(logType LogType) bool

func (*LogType) Set

func (c *LogType) Set(value string) error

func (LogType) String

func (c LogType) String() string

func (LogType) Type

func (c LogType) Type() string

type Source

type Source string
const (
	SourceStdout Source = "stdout"
	SourceStderr Source = "stderr"

	ErrorPrefix = " ** "
)

type TermLogFormatter

type TermLogFormatter struct {
	Prefix string
	Term   *term.Term
}

func (TermLogFormatter) Format

func (f TermLogFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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