Merge branch 'master' into file-logging-ocis-1666
This commit is contained in:
@@ -12,19 +12,19 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "log-level",
|
Name: "log-level",
|
||||||
Usage: "Set logging level",
|
Usage: "Set logging level",
|
||||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_LEVEL"},
|
EnvVars: []string{"GRAPH_EXPLORER_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||||
Destination: &cfg.Log.Level,
|
Destination: &cfg.Log.Level,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "log-pretty",
|
Name: "log-pretty",
|
||||||
Usage: "Enable pretty logging",
|
Usage: "Enable pretty logging",
|
||||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_PRETTY"},
|
EnvVars: []string{"GRAPH_EXPLORER_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||||
Destination: &cfg.Log.Pretty,
|
Destination: &cfg.Log.Pretty,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "log-color",
|
Name: "log-color",
|
||||||
Usage: "Enable colored logging",
|
Usage: "Enable colored logging",
|
||||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_COLOR"},
|
EnvVars: []string{"GRAPH_EXPLORER_LOG_COLOR", "OCIS_LOG_COLOR"},
|
||||||
Destination: &cfg.Log.Color,
|
Destination: &cfg.Log.Color,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,19 +19,19 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "log-level",
|
Name: "log-level",
|
||||||
Usage: "Set logging level",
|
Usage: "Set logging level",
|
||||||
EnvVars: []string{"GRAPH_LOG_LEVEL"},
|
EnvVars: []string{"GRAPH_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||||
Destination: &cfg.Log.Level,
|
Destination: &cfg.Log.Level,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "log-pretty",
|
Name: "log-pretty",
|
||||||
Usage: "Enable pretty logging",
|
Usage: "Enable pretty logging",
|
||||||
EnvVars: []string{"GRAPH_LOG_PRETTY"},
|
EnvVars: []string{"GRAPH_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||||
Destination: &cfg.Log.Pretty,
|
Destination: &cfg.Log.Pretty,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "log-color",
|
Name: "log-color",
|
||||||
Usage: "Enable colored logging",
|
Usage: "Enable colored logging",
|
||||||
EnvVars: []string{"GRAPH_LOG_COLOR"},
|
EnvVars: []string{"GRAPH_LOG_COLOR", "OCIS_LOG_COLOR"},
|
||||||
Destination: &cfg.Log.Color,
|
Destination: &cfg.Log.Color,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ type Mode int
|
|||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Mode Mode
|
Mode Mode
|
||||||
|
File string
|
||||||
|
|
||||||
Registry string
|
Registry string
|
||||||
Log Log
|
Log Log
|
||||||
|
|||||||
@@ -46,14 +46,6 @@ func Execute() error {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//r := registry.GetRegistry()
|
|
||||||
|
|
||||||
//opts := micro.Options{
|
|
||||||
// Registry: r,
|
|
||||||
//}
|
|
||||||
|
|
||||||
//runtime.AddMicroPlatform(app, opts)
|
|
||||||
|
|
||||||
cli.HelpFlag = &cli.BoolFlag{
|
cli.HelpFlag = &cli.BoolFlag{
|
||||||
Name: "help,h",
|
Name: "help,h",
|
||||||
Usage: "Show the help",
|
Usage: "Show the help",
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ import (
|
|||||||
// RootWithConfig applies cfg to the root flagset
|
// RootWithConfig applies cfg to the root flagset
|
||||||
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
||||||
return []cli.Flag{
|
return []cli.Flag{
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "config-file",
|
||||||
|
Usage: "Load config file from a non standard location.",
|
||||||
|
EnvVars: []string{"OCIS_CONFIG_FILE"},
|
||||||
|
Destination: &cfg.File,
|
||||||
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "ocis-log-level",
|
Name: "ocis-log-level",
|
||||||
Value: "info",
|
Value: "info",
|
||||||
|
|||||||
Reference in New Issue
Block a user