fix more inheritance on storages

This commit is contained in:
A.Unger
2021-11-11 15:18:44 +01:00
parent 3580e16771
commit 582649b7d4
+12 -4
View File
@@ -13,6 +13,8 @@ import (
"syscall"
"time"
"github.com/owncloud/ocis/ocis-pkg/shared"
mzlog "github.com/asim/go-micro/plugins/logger/zerolog/v4"
"github.com/mohae/deepcopy"
"github.com/olekukonko/tablewriter"
@@ -159,10 +161,16 @@ func Start(o ...Option) error {
FailureBackoff: 3 * time.Second,
})
s.cfg.Storage.Log.Color = s.cfg.Log.Color
s.cfg.Storage.Log.Level = s.cfg.Log.Level
s.cfg.Storage.Log.Pretty = s.cfg.Log.Pretty
s.cfg.Storage.Log.File = s.cfg.Log.File
if s.cfg.Commons == nil {
s.cfg.Commons = &shared.Commons{
Log: &shared.Log{},
}
}
s.cfg.Storage.Log.Color = s.cfg.Commons.Color
s.cfg.Storage.Log.Level = s.cfg.Commons.Level
s.cfg.Storage.Log.Pretty = s.cfg.Commons.Pretty
s.cfg.Storage.Log.File = s.cfg.Commons.File
if err = rpc.Register(s); err != nil {
if s != nil {