Reduce API log noise

This commit is contained in:
Mikei386
2026-07-10 13:09:56 +02:00
parent 3f1b7cd781
commit 091c5ff175
8 changed files with 46 additions and 11 deletions
+2 -1
View File
@@ -68,7 +68,7 @@ func (s *Service) Config() model.Config { s.mu.RLock(); defer s.mu.RUnlo
func (s *Service) Runs() []model.Run { return s.queue.Snapshot() }
func (s *Service) Logs() map[string]any {
return map[string]any{
"daemon": tailFile("/var/log/urbm.log", 512*1024, 300),
"daemon": tailFile("/var/log/urbm.log", 1024*1024, 1000),
"runs": runsWithLogs(s.queue.Snapshot(), 25),
}
}
@@ -386,6 +386,7 @@ func (s *Service) RepositoryStats(ctx context.Context) []model.RepositoryStats {
func (s *Service) SnapshotFiles(ctx context.Context, repoID, snapshot, path string) ([]map[string]any, error) {
started := time.Now()
s.log.Info("snapshot file listing started", "repoID", repoID, "snapshot", snapshot, "path", path)
repo, ok := s.repository(repoID)
if !ok {
return nil, errors.New("validation: unknown repository")