mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 11:19:39 -06:00
suport for proxy
This commit is contained in:
@@ -66,6 +66,7 @@ func NewLogger(cfg *config.Config) log.Logger {
|
||||
log.Level(cfg.Log.Level),
|
||||
log.Pretty(cfg.Log.Pretty),
|
||||
log.Color(cfg.Log.Color),
|
||||
log.File(cfg.Log.File),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -124,6 +125,7 @@ func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Proxy.Supervised = true
|
||||
}
|
||||
cfg.Proxy.Log.File = cfg.Log.File
|
||||
return SutureService{
|
||||
cfg: cfg.Proxy,
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ type Log struct {
|
||||
Level string
|
||||
Pretty bool
|
||||
Color bool
|
||||
File string
|
||||
}
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
|
||||
@@ -46,6 +46,12 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// ServerWithConfig applies cfg to the root flagset
|
||||
func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-file",
|
||||
Usage: "Enable log to file",
|
||||
EnvVars: []string{"PROXY_LOG_FILE", "OCIS_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "config-file",
|
||||
Value: "",
|
||||
|
||||
Reference in New Issue
Block a user