logs

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 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"`
	ProjectName string `json:"projectName"`
	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(projectName, buildId string, source LogSource) Logger
	CreateWorkspaceLogReader(workspaceId string) (io.Reader, error)
	CreateProjectLogReader(workspaceId, projectName string) (io.Reader, error)
	CreateBuildLogReader(projectName, buildId string) (io.Reader, error)
}

func NewLoggerFactory

func NewLoggerFactory(logsDir string) LoggerFactory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳