Output deprecated message for --timestamp and --debug-timestamp flags
This commit is contained in:
parent
1137b9d467
commit
85362faaed
@ -18,6 +18,7 @@ import (
|
||||
"github.com/mitchellh/go-glint"
|
||||
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/internal-shared/protomappers"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/localizer"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/terminal"
|
||||
"github.com/hashicorp/vagrant/internal/pkg/signalcontext"
|
||||
@ -288,14 +289,18 @@ func logger(args []string) ([]string, hclog.Logger, io.Writer, error) {
|
||||
}
|
||||
case "--timestamp":
|
||||
t := terminal.NonInteractiveUI(context.Background())
|
||||
t.Output("Deprecated")
|
||||
t.Output(
|
||||
localizer.LocalizeMsg("deprecated_flag", map[string]string{"Flag": "--timestamp"}),
|
||||
)
|
||||
case "--debug-timestamp":
|
||||
if level == hclog.NoLevel || level > hclog.Debug {
|
||||
level = hclog.Debug
|
||||
_ = os.Setenv("VAGRANT_LOG", "debug")
|
||||
}
|
||||
t := terminal.NonInteractiveUI(context.Background())
|
||||
t.Output("Deprecated")
|
||||
t.Output(
|
||||
localizer.LocalizeMsg("deprecated_flag", map[string]string{"Flag": "--debug-timestamp"}),
|
||||
)
|
||||
default:
|
||||
outArgs = append(outArgs, arg)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user