logs

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 9

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
	CreateWorkspaceLogReader(workspaceId string) (io.Reader, error)
	CreateProjectLogReader(workspaceId, projectName 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