diff --git a/audit/pkg/config/config.go b/audit/pkg/config/config.go index 3f72ddab0f..2041e52bcc 100644 --- a/audit/pkg/config/config.go +++ b/audit/pkg/config/config.go @@ -23,15 +23,15 @@ type Config struct { // Events combines the configuration options for the event bus. type Events struct { - Endpoint string `ocisConfig:"events_endpoint" env:"AUDIT_EVENTS_ENDPOINT"` - Cluster string `ocisConfig:"events_cluster" env:"AUDIT_EVENTS_CLUSTER"` - ConsumerGroup string `ocisConfig:"events_group" env:"AUDIT_EVENTS_GROUP"` + Endpoint string `ocisConfig:"events_endpoint" env:"AUDIT_EVENTS_ENDPOINT" desc:"the address of the streaming service"` + Cluster string `ocisConfig:"events_cluster" env:"AUDIT_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"` + ConsumerGroup string `ocisConfig:"events_group" env:"AUDIT_EVENTS_GROUP" desc:"the customergroup of the service. One group will only get one vopy of an event"` } // Auditlog holds audit log information type Auditlog struct { - LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE"` - LogToFile bool `ocisConfig:"log_to_file" env:"AUDIT_LOG_TO_FILE"` - FilePath string `ocisConfig:"filepath" env:"AUDIT_FILEPATH"` - Format string `ocisConfig:"format" env:"AUDIT_FORMAT"` + LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"` + LogToFile bool `ocisConfig:"log_to_file" env:"AUDIT_LOG_TO_FILE" desc:"logs to file if true"` + FilePath string `ocisConfig:"filepath" env:"AUDIT_FILEPATH" desc:"filepath to the logfile. Mandatory if LogToFile is true"` + Format string `ocisConfig:"format" env:"AUDIT_FORMAT" desc:"log format. using json is advised"` } diff --git a/audit/pkg/config/debug.go b/audit/pkg/config/debug.go index da6d2d5906..0176145c03 100644 --- a/audit/pkg/config/debug.go +++ b/audit/pkg/config/debug.go @@ -2,8 +2,8 @@ package config // Debug defines the available debug configuration. type Debug struct { - Addr string `ocisConfig:"addr" env:"NOTIFICATIONS_DEBUG_ADDR"` - Token string `ocisConfig:"token" env:"NOTIFICATIONS_DEBUG_TOKEN"` - Pprof bool `ocisConfig:"pprof" env:"NOTIFICATIONS_DEBUG_PPROF"` - Zpages bool `ocisConfig:"zpages" env:"NOTIFICATIONS_DEBUG_ZPAGES"` + Addr string `ocisConfig:"addr" env:"AUDIT_DEBUG_ADDR"` + Token string `ocisConfig:"token" env:"AUDIT_DEBUG_TOKEN"` + Pprof bool `ocisConfig:"pprof" env:"AUDIT_DEBUG_PPROF"` + Zpages bool `ocisConfig:"zpages" env:"AUDIT_DEBUG_ZPAGES"` } diff --git a/audit/pkg/config/log.go b/audit/pkg/config/log.go index ddb4d391f0..3a39cd4ccb 100644 --- a/audit/pkg/config/log.go +++ b/audit/pkg/config/log.go @@ -2,8 +2,8 @@ package config // Log defines the available log configuration. type Log struct { - Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;NOTIFICATIONS_LOG_LEVEL"` - Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;NOTIFICATIONS_LOG_PRETTY"` - Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;NOTIFICATIONS_LOG_COLOR"` - File string `mapstructure:"file" env:"OCIS_LOG_FILE;NOTIFICATIONS_LOG_FILE"` + Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;AUDIT_LOG_LEVEL"` + Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;AUDIT_LOG_PRETTY"` + Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;AUDIT_LOG_COLOR"` + File string `mapstructure:"file" env:"OCIS_LOG_FILE;AUDIT_LOG_FILE"` } diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go index 139de8b5bb..55acba22b9 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -20,7 +20,6 @@ import ( "github.com/olekukonko/tablewriter" accounts "github.com/owncloud/ocis/accounts/pkg/command" - audit "github.com/owncloud/ocis/audit/pkg/command" glauth "github.com/owncloud/ocis/glauth/pkg/command" graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/command" graph "github.com/owncloud/ocis/graph/pkg/command" @@ -95,7 +94,6 @@ func NewService(options ...Option) (*Service, error) { cfg: opts.Config, } - s.ServicesRegistry["audit"] = audit.NewSutureService s.ServicesRegistry["settings"] = settings.NewSutureService s.ServicesRegistry["nats"] = nats.NewSutureService s.ServicesRegistry["storage-metadata"] = storage.NewStorageMetadata