about summary refs log tree commit diff
path: root/frontend/frontend.go
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-12-02T11·03+0100
committerFlorian Klink <flokli@flokli.de>2019-12-02T11·03+0100
commit118a88dace6e825e8cb713e644f5bcbcb753737b (patch)
tree688c462ac68c6464dd1a235eb383ca6aac2c88d7 /frontend/frontend.go
parent04a24a0c601c28d01e1110fb82f57c7a7c3f5d74 (diff)
add rotatingloghandler which removes older log entries
Diffstat (limited to 'frontend/frontend.go')
-rw-r--r--frontend/frontend.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/frontend/frontend.go b/frontend/frontend.go
index abb5a3db4f70..f0ea46e497c9 100644
--- a/frontend/frontend.go
+++ b/frontend/frontend.go
@@ -11,10 +11,9 @@ import (
 	"github.com/rakyll/statik/fs"
 
 	"github.com/tweag/gerrit-queue/gerrit"
+	"github.com/tweag/gerrit-queue/misc"
 	_ "github.com/tweag/gerrit-queue/statik" // register static assets
 	"github.com/tweag/gerrit-queue/submitqueue"
-
-	"github.com/apex/log/handlers/memory"
 )
 
 //loadTemplate loads a list of templates, relative to the statikFS root, and a FuncMap, and returns a template object
@@ -48,7 +47,7 @@ func loadTemplate(templateNames []string, funcMap template.FuncMap) (*template.T
 }
 
 // MakeFrontend returns a http.Handler
-func MakeFrontend(memoryHandler *memory.Handler, gerritClient *gerrit.Client, runner *submitqueue.Runner) http.Handler {
+func MakeFrontend(rotatingLogHandler *misc.RotatingLogHandler, gerritClient *gerrit.Client, runner *submitqueue.Runner) http.Handler {
 	router := gin.Default()
 
 	projectName := gerritClient.GetProjectName()
@@ -88,7 +87,7 @@ func MakeFrontend(memoryHandler *memory.Handler, gerritClient *gerrit.Client, ru
 			"HEAD":             HEAD,
 
 			// History
-			"memory": memoryHandler,
+			"memory": rotatingLogHandler,
 		})
 	})
 	return router