Documentation ¶
Index ¶
- Variables
- func ReadCompressedFile(filePath string) (io.Reader, error)
- func ReadJSONLog(ctx context.Context, logReader io.Reader, follow bool, c chan interface{}, ...)
- func ReadLog(ctx context.Context, logReader io.Reader, follow bool, c chan []byte, ...)
- type ApiBasePath
- type ILoggerFactory
- type LogEntry
- type LogFileConfig
- type LogSource
- type Logger
- type LoggerFactoryConfig
- type RemoteLogger
- type RemoteLoggerFactoryConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var LogDelimiter = "!-#_^*|\n"
Functions ¶
func ReadCompressedFile ¶ added in v0.52.0
func ReadJSONLog ¶ added in v0.52.0
Types ¶
type ApiBasePath ¶ added in v0.52.0
type ApiBasePath string
var ( ApiBasePathWorkspace ApiBasePath = "/log/workspace" ApiBasePathBuild ApiBasePath = "/log/build" ApiBasePathRunner ApiBasePath = "/log/runner" ApiBasePathTarget ApiBasePath = "/log/target" )
type ILoggerFactory ¶ added in v0.52.0
type ILoggerFactory interface { CreateLogger(id, label string, source LogSource) (Logger, error) CreateLogReader(id string) (io.Reader, error) CreateLogWriter(id string) (io.WriteCloser, error) }
func NewLoggerFactory ¶
func NewLoggerFactory(config LoggerFactoryConfig) ILoggerFactory
type LogFileConfig ¶ added in v0.52.0
type LogFileConfig struct { Path string `json:"path" validate:"required"` MaxSize int32 `json:"maxSize" validate:"required"` MaxBackups int32 `json:"maxBackups" validate:"required"` MaxAge int32 `json:"maxAge" validate:"required"` LocalTime bool `json:"localTime" validate:"optional"` Compress bool `json:"compress" validate:"optional"` } // @name LogFileConfig
func GetDefaultLogFileConfig ¶ added in v0.52.0
func GetDefaultLogFileConfig(logFilePath string) *LogFileConfig
type LoggerFactoryConfig ¶ added in v0.52.0
type LoggerFactoryConfig struct { LogsDir string ApiUrl *string ApiKey *string ApiBasePath *ApiBasePath }
type RemoteLogger ¶ added in v0.52.0
type RemoteLogger struct {
// contains filtered or unexported fields
}
func (*RemoteLogger) Cleanup ¶ added in v0.52.0
func (r *RemoteLogger) Cleanup() error
func (*RemoteLogger) Close ¶ added in v0.52.0
func (r *RemoteLogger) Close() error
func (*RemoteLogger) ConstructJsonLogEntry ¶ added in v0.52.0
func (r *RemoteLogger) ConstructJsonLogEntry(p []byte) ([]byte, error)
type RemoteLoggerFactoryConfig ¶ added in v0.52.0
type RemoteLoggerFactoryConfig struct { LogsDir string ApiUrl string ApiKey string ApiBasePath ApiBasePath }
Click to show internal directories.
Click to hide internal directories.