propagate storage common logging config

This commit is contained in:
A.Unger
2021-11-11 13:58:19 +01:00
parent c6191b7404
commit 7eb2c25d65
15 changed files with 24 additions and 50 deletions

View File

@@ -132,9 +132,7 @@ type AppProviderSutureService struct {
// NewAppProvider creates a new store.AppProviderSutureService
func NewAppProvider(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.AppProvider.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return AppProviderSutureService{
cfg: cfg.Storage,
}

View File

@@ -151,9 +151,7 @@ type AuthBasicSutureService struct {
// NewAuthBasicSutureService creates a new store.AuthBasicSutureService
func NewAuthBasic(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.AuthBasic.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return AuthBasicSutureService{
cfg: cfg.Storage,
}

View File

@@ -127,9 +127,7 @@ type AuthBearerSutureService struct {
// NewAuthBearerSutureService creates a new gateway.AuthBearerSutureService
func NewAuthBearer(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.AuthBearer.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return AuthBearerSutureService{
cfg: cfg.Storage,
}

View File

@@ -123,9 +123,7 @@ type AuthMachineSutureService struct {
// NewAuthMachineSutureService creates a new gateway.AuthMachineSutureService
func NewAuthMachine(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.AuthMachine.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return AuthMachineSutureService{
cfg: cfg.Storage,
}

View File

@@ -335,11 +335,9 @@ type FrontendSutureService struct {
cfg *config.Config
}
// NewFrontendSutureService creates a new frontend.FrontendSutureService
// NewFrontend creates a new frontend.FrontendSutureService
func NewFrontend(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Frontend.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return FrontendSutureService{
cfg: cfg.Storage,
}

View File

@@ -351,9 +351,7 @@ type GatewaySutureService struct {
// NewGatewaySutureService creates a new gateway.GatewaySutureService
func NewGateway(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Gateway.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return GatewaySutureService{
cfg: cfg.Storage,
}

View File

@@ -165,9 +165,7 @@ type GroupSutureService struct {
// NewGroupProviderSutureService creates a new storage.GroupProvider
func NewGroupProvider(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Groups.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return GroupSutureService{
cfg: cfg.Storage,
}

View File

@@ -191,9 +191,7 @@ type SharingSutureService struct {
// NewSharingSutureService creates a new store.SharingSutureService
func NewSharing(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Sharing.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return SharingSutureService{
cfg: cfg.Storage,
}

View File

@@ -150,9 +150,7 @@ type StorageHomeSutureService struct {
// NewStorageHomeSutureService creates a new storage.StorageHomeSutureService
func NewStorageHome(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.StorageHome.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return StorageHomeSutureService{
cfg: cfg.Storage,
}

View File

@@ -166,9 +166,7 @@ type MetadataSutureService struct {
// NewSutureService creates a new storagemetadata.SutureService
func NewStorageMetadata(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.StorageMetadata.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return MetadataSutureService{
cfg: cfg.Storage,
}

View File

@@ -124,9 +124,7 @@ type StoragePublicLinkSutureService struct {
// NewStoragePublicLinkSutureService creates a new storage.StoragePublicLinkSutureService
func NewStoragePublicLink(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.StoragePublicLink.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return StoragePublicLinkSutureService{
cfg: cfg.Storage,
}

View File

@@ -150,9 +150,7 @@ type StorageUsersSutureService struct {
// NewStorageUsersSutureService creates a new storage.StorageUsersSutureService
func NewStorageUsers(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.StorageUsers.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return StorageUsersSutureService{
cfg: cfg.Storage,
}

View File

@@ -186,9 +186,7 @@ type UserProviderSutureService struct {
// NewUserProviderSutureService creates a new storage.UserProvider
func NewUserProvider(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Users.Supervised = true
}
cfg.Storage.Log = cfg.Commons.Log
return UserProviderSutureService{
cfg: cfg.Storage,
}