@@ -73,7 +73,12 @@ func semanticVersion() string {
7373// Execute adds all child commands to the root command and sets flags appropriately.
7474// This is called by main.main(). It only needs to happen once to the rootCmd.
7575func Execute () {
76- if err := NewCommand ().Execute (); err != nil {
76+ ExecuteCommand (NewCommand ())
77+ }
78+
79+ // ExecuteCommand runs a preconfigured command, and exits the appropriate error code.
80+ func ExecuteCommand (c * Command ) {
81+ if err := c .Execute (); err != nil {
7782 exit := 1
7883 var terr * exitError
7984 if errors .As (err , & terr ) {
@@ -646,6 +651,8 @@ func loadConfig(c *Command, args []string, opts []Option) error {
646651
647652 if c .conf .Quiet {
648653 c .logger = log .NewStdLogger (io .Discard , os .Stderr )
654+ } else if c .conf .LogDebugStdout {
655+ c .logger = log .NewStdLogger (os .Stdout , os .Stderr )
649656 }
650657
651658 err = parseConfig (c , c .conf , args )
@@ -1105,6 +1112,9 @@ func runSignalWrapper(cmd *Command) (err error) {
11051112 return err
11061113 case p = <- startCh :
11071114 cmd .logger .Infof ("The proxy has started successfully and is ready for new connections!" )
1115+ if cmd .conf .ProxyV1Compatibility {
1116+ cmd .logger .Infof ("Ready for new connections" )
1117+ }
11081118 // If running under systemd with Type=notify, it will send a message to the
11091119 // service manager that it is ready to handle connections now.
11101120 go func () {
0 commit comments