Sybren A. Stüvel a368230afa Manager: fix race condition in logging of worker name/UUID
Instead of updating the logger in the context, just store a new logger
in a new sub-context.
2022-06-17 17:13:32 +02:00

14 lines
248 B
Go

package api_impl
// SPDX-License-Identifier: GPL-3.0-or-later
import (
"github.com/labstack/echo/v4"
"github.com/rs/zerolog"
)
func requestLogger(e echo.Context) zerolog.Logger {
logger := zerolog.Ctx(e.Request().Context())
return *logger
}