Constant writing to main.log

I just noticed that Kopia is constantly writing to \kopia-ui\logs\main.log :

[2024-12-05 18:55:46.933] [info]  successful login by client 127.0.0.1:13938 for user server-control

[2024-12-05 18:55:46.934] [info]  successful login by client 127.0.0.1:13939 for user server-control

[2024-12-05 18:55:49.948] [info]  successful login by client 127.0.0.1:13938 for user server-control

[2024-12-05 18:55:49.948] [info]  successful login by client 127.0.0.1:13939 for user server-control

[2024-12-05 18:55:52.950] [info]  successful login by client 127.0.0.1:13938 for user server-control

[2024-12-05 18:55:52.950] [info]  successful login by client 127.0.0.1:13939 for user server-control

[2024-12-05 18:55:55.954] [info]  successful login by client 127.0.0.1:13938 for user server-control

[2024-12-05 18:55:55.955] [info]  successful login by client 127.0.0.1:13939 for user server-control

[2024-12-05 18:55:58.958] [info]  successful login by client 127.0.0.1:13938 for user server-control

[2024-12-05 18:55:58.958] [info]  successful login by client 127.0.0.1:13939 for user server-control

This seems very excessive / unnecessary?

My untested (it compiles, haven’t tested if it really prevents spammy log lines) change would be:

diff --git internal/server/server.go internal/server/server.go
index 208c5048..a3b580a8 100644
--- internal/server/server.go
+++ internal/server/server.go
@@ -228,7 +228,7 @@ func isAuthenticated(rc requestContext) bool {
                })
 
                // Log successful authentication
-               log(rc.req.Context()).Infof("successful login by client %s for user %s", rc.req.RemoteAddr, username)
+               log(rc.req.Context()).Debugf("successful login by client %s for user %s", rc.req.RemoteAddr, username)
        }
 
        return true

which (if I understand it correctly) moves the logging from Info to Debug level.

1 Like

I reported it - Constant writing to main.log · Issue #4295 · kopia/kopia · GitHub

Fix has been posted to master and is available at Release v20241207.0.113027 · kopia/kopia-test-builds · GitHub