Add some middleware
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -57,6 +57,7 @@ func ActionServe(c *cli.Context) error {
|
||||
// Setup loggers
|
||||
rootLogger := getRootLogger(cfg.LogLevel)
|
||||
serverLogger := rootLogger.Named("SERV")
|
||||
accessLogger := rootLogger.Named("ACCS")
|
||||
|
||||
// Setup contexts for clean shutdown
|
||||
rootCtx, rootCancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
@@ -70,6 +71,7 @@ func ActionServe(c *cli.Context) error {
|
||||
srv := gpaste.NewHTTPServer(cfg)
|
||||
srv.Addr = cfg.ListenAddr
|
||||
srv.Logger = serverLogger
|
||||
srv.AccessLogger = accessLogger
|
||||
|
||||
// Wait for cancel
|
||||
go func() {
|
||||
|
Reference in New Issue
Block a user