Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatForFile ¶
func FormatForFile(sources []config.FrameworkLogSource, filename string) string
FormatForFile returns the log format string for the given filename based on the framework's log sources. Falls back to "raw".
func LatestModTime ¶
func LatestModTime(projectDir string, sources []config.FrameworkLogSource) time.Time
LatestModTime returns the most recent modification time across all log files matched by the given sources. Returns zero time if no files found.
func ResolveLogFilePath ¶
func ResolveLogFilePath(projectDir string, sources []config.FrameworkLogSource, filename string) string
ResolveLogFilePath finds the full path for a log file by name within the configured sources. Returns empty string if not found or path traversal detected.
Types ¶
type LogEntry ¶
type LogEntry struct {
Level string `json:"level"`
Date string `json:"date"`
Channel string `json:"channel"`
Message string `json:"message"`
Detail string `json:"detail,omitempty"`
}
LogEntry represents a single parsed log entry.
type LogFile ¶
type LogFile struct {
Name string `json:"name"`
Size int64 `json:"size"`
ModTime string `json:"mod_time"`
}
LogFile represents an available log file on disk.
func DiscoverLogFiles ¶
func DiscoverLogFiles(projectDir string, sources []config.FrameworkLogSource) ([]LogFile, error)
DiscoverLogFiles expands the configured log source globs for a project and returns the matching files sorted by modification time (newest first). Resolved paths are validated to stay within projectDir.