logs

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogDelimiter = "!-#_^*|\n"

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Source      string  `json:"source"`
	WorkspaceId *string `json:"workspaceId,omitempty"`
	ProjectName *string `json:"projectName,omitempty"`
	BuildId     *string `json:"buildId,omitempty"`
	Msg         string  `json:"msg"`
	Level       string  `json:"level"`
	Time        string  `json:"time"`
}

type LogSource

type LogSource string
const (
	LogSourceServer   LogSource = "server"
	LogSourceProvider LogSource = "provider"
	LogSourceBuilder  LogSource = "builder"
)

type Logger

type Logger interface {
	io.WriteCloser
	Cleanup() error
}

type LoggerFactory

type LoggerFactory interface {
	CreateWorkspaceLogger(workspaceId string, source LogSource) Logger
	CreateProjectLogger(workspaceId, projectName string, source LogSource) Logger
	CreateBuildLogger(buildId string, source LogSource) Logger
	CreateWorkspaceLogReader(workspaceId string) (io.Reader, error)
	CreateProjectLogReader(workspaceId, projectName string) (io.Reader, error)
	CreateBuildLogReader(buildId string) (io.Reader, error)
}

func NewLoggerFactory

func NewLoggerFactory(wsLogsDir *string, buildLogsDir *string) LoggerFactory

Jump to

Keyboard shortcuts

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