fix internal logging usage

This commit is contained in:
evanboyle 2020-03-19 11:45:10 -07:00
parent 31d8f79f35
commit a2b368827f
3 changed files with 4 additions and 7 deletions

View file

@ -116,7 +116,7 @@ func NewPulumiCmd() *cobra.Command {
}
if cmdutil.IsTruthy(os.Getenv("PULUMI_SKIP_UPDATE_CHECK")) {
logging.Infof("skipping update check")
logging.V(5).Infof("skipping update check")
close(updateCheckResult)
} else {
// Run the version check in parallel so that it doesn't block executing the command.

View file

@ -21,7 +21,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/pulumi/pulumi/sdk/go/common/tokens"
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
"github.com/pulumi/pulumi/sdk/go/common/workspace"
)
@ -31,7 +30,6 @@ func mustMakeVersion(v string) *semver.Version {
}
func TestDefaultProvidersSingle(t *testing.T) {
logging.InitLogging(true, 7, false)
languagePlugins := newPluginSet()
languagePlugins.Add(workspace.PluginInfo{
Name: "aws",
@ -60,7 +58,6 @@ func TestDefaultProvidersSingle(t *testing.T) {
}
func TestDefaultProvidersOverrideNoVersion(t *testing.T) {
logging.InitLogging(true, 7, false)
languagePlugins := newPluginSet()
languagePlugins.Add(workspace.PluginInfo{
Name: "aws",

View file

@ -438,17 +438,17 @@ func (host *defaultHost) Close() error {
// Close all plugins.
for _, plug := range host.analyzerPlugins {
if err := plug.Plugin.Close(); err != nil {
logging.Infof("Error closing '%s' analyzer plugin during shutdown; ignoring: %v", plug.Info.Name, err)
logging.V(5).Infof("Error closing '%s' analyzer plugin during shutdown; ignoring: %v", plug.Info.Name, err)
}
}
for _, plug := range host.resourcePlugins {
if err := plug.Plugin.Close(); err != nil {
logging.Infof("Error closing '%s' resource plugin during shutdown; ignoring: %v", plug.Info.Name, err)
logging.V(5).Infof("Error closing '%s' resource plugin during shutdown; ignoring: %v", plug.Info.Name, err)
}
}
for _, plug := range host.languagePlugins {
if err := plug.Plugin.Close(); err != nil {
logging.Infof("Error closing '%s' language plugin during shutdown; ignoring: %v", plug.Info.Name, err)
logging.V(5).Infof("Error closing '%s' language plugin during shutdown; ignoring: %v", plug.Info.Name, err)
}
}