appspacelogger

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppLogger

type AppLogger struct {
	AppLocation2Path interface {
		Meta(string) string
	} `checkinject:"required"`
	// contains filtered or unexported fields
}

AppLogger opens and manages logs for each app-version (identified by location key.) Used when running sandbox to get app routes, etc... for example.

func (*AppLogger) Close

func (l *AppLogger) Close(locationKey string)

Close the log file for logger at locationKey

func (*AppLogger) Forget

func (l *AppLogger) Forget(locationKey string)

Forget about this locationKey This closes the log file and drops all subscriptions

func (*AppLogger) Get

func (l *AppLogger) Get(locationKey string) domain.LoggerI

Get a reference to logger for app at locationKey

func (*AppLogger) Init

func (l *AppLogger) Init()

func (*AppLogger) Log

func (l *AppLogger) Log(locationKey string, source string, message string)

Log a message to app logger at location key

func (*AppLogger) Open

func (l *AppLogger) Open(locationKey string) domain.LoggerI

Open the log file and return the logger at locationKey I wonder if this one is actually necessary?

type AppspaceLogger

type AppspaceLogger struct {
	AppspaceModel interface {
		GetFromID(domain.AppspaceID) (*domain.Appspace, error)
	} `checkinject:"required"`
	AppspaceStatus interface {
		IsLockedClosed(domain.AppspaceID) bool
	} `checkinject:"required"`

	Config *domain.RuntimeConfig
	// contains filtered or unexported fields
}

AppspaceLogger opens and manages appspace loggers

func (*AppspaceLogger) Close

func (l *AppspaceLogger) Close(appspaceID domain.AppspaceID)

Close the log file for logger for appspace ID

func (*AppspaceLogger) Forget

func (l *AppspaceLogger) Forget(appspaceID domain.AppspaceID)

Forget about logger for appspace ID This closes the log file and drops all subscriptions

func (*AppspaceLogger) Get

func (l *AppspaceLogger) Get(appspaceID domain.AppspaceID) domain.LoggerI

Get a reference to logger for appspaceID

func (*AppspaceLogger) Init

func (l *AppspaceLogger) Init()

Init makes maps

func (*AppspaceLogger) Log

func (l *AppspaceLogger) Log(appspaceID domain.AppspaceID, source string, message string)

Log writes to the log file for the appspace

func (*AppspaceLogger) Open

func (l *AppspaceLogger) Open(appspaceID domain.AppspaceID) domain.LoggerI

Open the log file and return the logger for appspace ID

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger system sufficiently genric to support app and appspace logs

func (*Logger) GetLastBytes

func (l *Logger) GetLastBytes(n int64) (domain.LogChunk, error)

GetLastBytes returns the log lines found in the last n bytes of the file.

func (*Logger) Log

func (l *Logger) Log(source, message string)

func (*Logger) SubscribeEntries

func (l *Logger) SubscribeEntries(n int64) (domain.LogChunk, <-chan string, error)

func (*Logger) SubscribeStatus

func (l *Logger) SubscribeStatus() (bool, <-chan bool)

func (*Logger) UnsubscribeEntries

func (l *Logger) UnsubscribeEntries(ch <-chan string)

func (*Logger) UnsubscribeStatus

func (l *Logger) UnsubscribeStatus(ch <-chan bool)

Jump to

Keyboard shortcuts

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