logs

package
v0.0.0-...-c2f7fc6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogType_name = map[LogType]string{
		LogTypeUnspecified: "UNSPECIFIED",
		LogTypeRun:         "RUN",
		LogTypeBuild:       "BUILD",
		LogTypeAll:         "ALL",
	}
	LogType_value = map[string]LogType{
		"UNSPECIFIED": LogTypeUnspecified,
		"RUN":         LogTypeRun,
		"BUILD":       LogTypeBuild,
		"ALL":         LogTypeAll,
	}
)
View Source
var AllLogTypes = []LogType{
	LogTypeRun,
	LogTypeBuild,
}

Functions

func IsLogrusError

func IsLogrusError(message string) bool

Types

type DiscardFormatter

type DiscardFormatter struct{}

func (DiscardFormatter) Format

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

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 InvalidLogTypeError

type InvalidLogTypeError struct {
	Value string
}

func (InvalidLogTypeError) Error

func (e InvalidLogTypeError) Error() string

type LogType

type LogType uint32
const (
	LogTypeUnspecified LogType = 0
	LogTypeRun         LogType = 1 << iota
	LogTypeBuild

	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

func (LogType) Value

func (c LogType) Value() string

type Source

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

	ErrorPrefix = " ** "
)

type TermLogFormatter

type TermLogFormatter struct {
	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