consolidate log config in storage-system

Signed-off-by: Christian Richter <c.richter@opencloud.eu>
This commit is contained in:
Christian Richter
2026-01-08 13:34:16 +01:00
parent 245a77a813
commit 6c46867a35
5 changed files with 10 additions and 44 deletions
@@ -5,9 +5,9 @@ import (
"net/http"
"github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/config"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/logging"
"github.com/spf13/cobra"
)
@@ -21,7 +21,7 @@ func Health(cfg *config.Config) *cobra.Command {
return configlog.ReturnError(parser.ParseConfig(cfg))
},
RunE: func(cmd *cobra.Command, args []string) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
logger := log.Configure(cfg.Service.Name, cfg.Commons, cfg.LogLevel)
resp, err := http.Get(
fmt.Sprintf(
@@ -6,13 +6,13 @@ import (
"os/signal"
"github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/runner"
"github.com/opencloud-eu/opencloud/pkg/tracing"
"github.com/opencloud-eu/opencloud/pkg/version"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/config"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/logging"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/revaconfig"
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/server/debug"
"github.com/opencloud-eu/reva/v2/cmd/revad/runtime"
@@ -29,7 +29,7 @@ func Server(cfg *config.Config) *cobra.Command {
return configlog.ReturnFatal(parser.ParseConfig(cfg))
},
RunE: func(cmd *cobra.Command, args []string) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
logger := log.Configure(cfg.Service.Name, cfg.Commons, cfg.LogLevel)
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil {
return err