Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLogEntry ¶
type AccessLogEntry struct {
Method string `json:"method"` // HTTP method (GET, POST, etc.)
Path string `json:"path"` // Request path
StatusCode int `json:"status_code"` // HTTP status code
Duration float64 `json:"duration_ms"` // Response time in milliseconds
BytesOut int64 `json:"bytes_out"` // Response size
ClientIP string `json:"client_ip"` // Client IP address
UserAgent string `json:"user_agent"` // User agent string
Referrer string `json:"referrer"` // HTTP referrer
Host string `json:"host"` // Request host/domain
Protocol string `json:"protocol"` // HTTP/HTTPS
RouterName string `json:"router_name"` // Traefik router name
ServiceName string `json:"service_name"` // Traefik service name
DownstreamIP string `json:"downstream_ip"` // Original client IP (behind proxy)
}
AccessLogEntry represents Traefik access log details
type AggregatedLog ¶ added in v0.0.3
type AggregatedLog struct {
Timestamp time.Time `json:"timestamp"`
Level LogLevel `json:"level"`
Service string `json:"service"`
Server string `json:"server"`
Container string `json:"container,omitempty"`
Message string `json:"message"`
Source string `json:"source"` // "container", "access", "system"
Metadata map[string]string `json:"metadata,omitempty"`
}
AggregatedLog represents a log entry from any source
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector handles log collection from services
func NewCollector ¶
NewCollector creates a new log collector
func (*Collector) GetAccessLogs ¶
GetAccessLogs fetches recent access logs for a project
func (*Collector) GetContainerLogs ¶
GetContainerLogs fetches recent container logs for a service
type LogAggregator ¶ added in v0.0.3
type LogAggregator struct {
// contains filtered or unexported fields
}
LogAggregator collects and aggregates logs from multiple sources
func NewLogAggregator ¶ added in v0.0.3
func NewLogAggregator(cfg *config.Config, sshPool *ssh.Pool, environment string, verbose bool) *LogAggregator
NewLogAggregator creates a new log aggregator
func (*LogAggregator) Export ¶ added in v0.0.3
func (a *LogAggregator) Export(logs []AggregatedLog, format, outputPath string) error
Export exports logs to a file
func (*LogAggregator) Query ¶ added in v0.0.3
func (a *LogAggregator) Query(ctx context.Context, query LogQuery) ([]AggregatedLog, error)
Query searches logs based on criteria
func (*LogAggregator) Stream ¶ added in v0.0.3
func (a *LogAggregator) Stream(ctx context.Context, query LogQuery) (<-chan AggregatedLog, error)
Stream starts streaming logs to a channel
type LogEntry ¶
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Source string `json:"source"` // "container" or "access"
Project string `json:"project"` // Project name
Service string `json:"service"` // Service name
Server string `json:"server"` // Server name
Message string `json:"message"` // Raw log message (for container logs)
Level string `json:"level"` // Log level (INFO, ERROR, etc.)
AccessLog *AccessLogEntry `json:"access_log"` // Access log details (if source=access)
ContainerID string `json:"container_id"`
Tags map[string]string `json:"tags"` // Additional metadata
}
LogEntry represents a unified log entry (container or access log)
Click to show internal directories.
Click to hide internal directories.