diff --git a/dist/urbm-2026.07.10.r005-x86_64-1.txz.sha256 b/dist/urbm-2026.07.10.r005-x86_64-1.txz.sha256 deleted file mode 100644 index c492a9c..0000000 --- a/dist/urbm-2026.07.10.r005-x86_64-1.txz.sha256 +++ /dev/null @@ -1 +0,0 @@ -9c7e39a06a10ae9557796457e9ed754e9e0dcf65f12be39561276d9fce6cbc0b urbm-2026.07.10.r005-x86_64-1.txz diff --git a/dist/urbm-2026.07.10.r005-x86_64-1.txz b/dist/urbm-2026.07.10.r006-x86_64-1.txz similarity index 56% rename from dist/urbm-2026.07.10.r005-x86_64-1.txz rename to dist/urbm-2026.07.10.r006-x86_64-1.txz index 8aa22ef..17c6480 100644 Binary files a/dist/urbm-2026.07.10.r005-x86_64-1.txz and b/dist/urbm-2026.07.10.r006-x86_64-1.txz differ diff --git a/dist/urbm-2026.07.10.r006-x86_64-1.txz.sha256 b/dist/urbm-2026.07.10.r006-x86_64-1.txz.sha256 new file mode 100644 index 0000000..4246dcb --- /dev/null +++ b/dist/urbm-2026.07.10.r006-x86_64-1.txz.sha256 @@ -0,0 +1 @@ +24660d70ea52abe59214ad8a56f31023cef090cb2fafeb557690870ed5790aa9 urbm-2026.07.10.r006-x86_64-1.txz diff --git a/dist/urbm.plg b/dist/urbm.plg index 5b266c7..8a22768 100644 --- a/dist/urbm.plg +++ b/dist/urbm.plg @@ -2,13 +2,17 @@ - + - + ]> +### 2026.07.10.r006 +- Stop logging high-frequency health, log, and activity polling requests unless they are slow or fail. +- Log snapshot file-listing requests immediately when they start and show a larger daemon log tail in the Protokolle tab. + ### 2026.07.10.r005 - Log snapshot file-listing failures from the daemon and PHP bridge to `/var/log/urbm.log` so they appear in the Protokolle tab. - Increase the daemon HTTP write timeout for large snapshot trees and return concrete backend errors instead of generic 500 responses where possible. diff --git a/internal/api/server.go b/internal/api/server.go index d3d53f8..369276b 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -332,7 +332,33 @@ func writeError(w http.ResponseWriter, err error) { func requestLog(log *slog.Logger, next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { started := time.Now() - next.ServeHTTP(w, r) - log.Info("api request", "method", r.Method, "path", r.URL.Path, "durationMs", time.Since(started).Milliseconds()) + recorder := &statusRecorder{ResponseWriter: w, status: http.StatusOK} + next.ServeHTTP(recorder, r) + duration := time.Since(started) + if shouldLogRequest(r, recorder.status, duration) { + log.Info("api request", "method", r.Method, "path", r.URL.Path, "status", recorder.status, "durationMs", duration.Milliseconds()) + } }) } + +type statusRecorder struct { + http.ResponseWriter + status int +} + +func (r *statusRecorder) WriteHeader(status int) { + r.status = status + r.ResponseWriter.WriteHeader(status) +} + +func shouldLogRequest(r *http.Request, status int, duration time.Duration) bool { + if status >= 400 || duration >= time.Second { + return true + } + switch r.URL.Path { + case "/v1/runs", "/v1/health", "/v1/logs": + return false + default: + return true + } +} diff --git a/internal/service/service.go b/internal/service/service.go index ff7d832..ae71e0f 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -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") diff --git a/plugin/urbm.plg b/plugin/urbm.plg index ed48489..55f9a77 100644 --- a/plugin/urbm.plg +++ b/plugin/urbm.plg @@ -2,13 +2,17 @@ - + ]> +### 2026.07.10.r006 +- Stop logging high-frequency health, log, and activity polling requests unless they are slow or fail. +- Log snapshot file-listing requests immediately when they start and show a larger daemon log tail in the Protokolle tab. + ### 2026.07.10.r005 - Log snapshot file-listing failures from the daemon and PHP bridge to `/var/log/urbm.log` so they appear in the Protokolle tab. - Increase the daemon HTTP write timeout for large snapshot trees and return concrete backend errors instead of generic 500 responses where possible. diff --git a/webgui/URBM.page b/webgui/URBM.page index 3bad3f1..5d468b6 100644 --- a/webgui/URBM.page +++ b/webgui/URBM.page @@ -9,12 +9,12 @@ Tag="URBM Unraid Restic Backup Manager backup snapshots restore" - +
- -

URBM 2026.07.10.r005

Restic Backup Manager für Unraid

+ +

URBM 2026.07.10.r006

Restic Backup Manager für Unraid

Verbindung wird hergestellt...
@@ -33,4 +33,4 @@ $pluginRoot = '/plugins/urbm';
- +