Documentation ¶
Overview ¶
Package eapps provides primitives for searching and processing data in Log files of apps.
Index ¶
- func LogChecker(loader loaders.Loader, devUUID uuid.UUID, appUUID uuid.UUID, ...) (err error)
- func LogItemFind(le *logs.LogEntry, query map[string]string) bool
- func LogItemPrint(le *logs.LogEntry, _ types.OutputFormat, query []string) *types.PrintResult
- func LogLast(loader loaders.Loader, query map[string]string, handler HandlerFunc) error
- func LogPrn(le *logs.LogEntry, format types.OutputFormat)
- func LogWatch(loader loaders.Loader, query map[string]string, handler HandlerFunc, ...) error
- func ParseLogEntry(data []byte) (logEntry *logs.LogEntry, err error)
- type HandlerFunc
- type LogCheckerMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogChecker ¶
func LogChecker(loader loaders.Loader, devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, handler HandlerFunc, mode LogCheckerMode, timeout time.Duration) (err error)
LogChecker check logs by pattern from existence files with LogLast and use LogWatchWithTimeout with timeout for observe new files
func LogItemFind ¶
LogItemFind find LogItem records by reqexps in 'query' corresponded to LogItem structure.
func LogItemPrint ¶
func LogItemPrint(le *logs.LogEntry, _ types.OutputFormat, query []string) *types.PrintResult
LogItemPrint find LogItem elements by paths in 'query'
func LogLast ¶
LogLast function process Log files in the 'filepath' directory according to the 'query' reqexps and return last founded item
Types ¶
type HandlerFunc ¶
HandlerFunc must process LogItem and return true to exit or false to continue
func HandleFactory ¶
func HandleFactory(format types.OutputFormat, once bool) HandlerFunc
HandleFactory implements HandlerFunc which prints log in the provided format
type LogCheckerMode ¶
type LogCheckerMode int
LogCheckerMode is InfoExist, InfoNew and InfoAny
const ( LogExist LogCheckerMode = -3 // just look to existing files LogNew LogCheckerMode = -2 // wait for new files LogAny LogCheckerMode = -1 // use both mechanisms )
LogChecker modes LogExist, LogNew and LogAny.
func LogTail ¶
func LogTail(count uint) LogCheckerMode
LogTail returns LogCheckerMode for process only defined count of last messages