Skip to content

Commit be0c9d6

Browse files
committed
refactor: reduce resolve logging level
1 parent 9be6383 commit be0c9d6

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

language/js/resolve.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os"
66
"path"
77
"strings"
8-
"time"
98

109
common "github.com/aspect-build/aspect-gazelle/common"
1110
BazelLog "github.com/aspect-build/aspect-gazelle/common/logger"
@@ -294,8 +293,7 @@ func (ts *typeScriptLang) Resolve(
294293
importData interface{},
295294
from label.Label,
296295
) {
297-
start := time.Now()
298-
BazelLog.Infof("Resolve(%s): //%s:%s", LanguageName, from.Pkg, r.Name())
296+
BazelLog.Debugf("Resolve(%s): //%s:%s", LanguageName, from.Pkg, r.Name())
299297

300298
// TsProject imports are resolved as deps
301299
switch r.Kind() {
@@ -358,8 +356,6 @@ func (ts *typeScriptLang) Resolve(
358356
r.SetAttr("srcs", srcs)
359357
}
360358
}
361-
362-
BazelLog.Infof("Resolve(%s): //%s:%s DONE in %s", LanguageName, from.Pkg, r.Name(), time.Since(start).String())
363359
}
364360
func (ts *typeScriptLang) addTsLib(
365361
c *config.Config,

language/kotlin/resolver.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"errors"
55
"fmt"
66
"strings"
7-
"time"
87

98
common "github.com/aspect-build/aspect-gazelle/common"
109
BazelLog "github.com/aspect-build/aspect-gazelle/common/logger"
@@ -64,8 +63,7 @@ func (kt *kotlinLang) Embeds(r *rule.Rule, from label.Label) []label.Label {
6463
}
6564

6665
func (kt *kotlinLang) Resolve(c *config.Config, ix *resolve.RuleIndex, rc *repo.RemoteCache, r *rule.Rule, importData interface{}, from label.Label) {
67-
start := time.Now()
68-
BazelLog.Infof("Resolve(%s): //%s:%s", LanguageName, from.Pkg, r.Name())
66+
BazelLog.Debugf("Resolve(%s): //%s:%s", LanguageName, from.Pkg, r.Name())
6967

7068
if r.Kind() == KtJvmLibrary || r.Kind() == KtJvmBinary {
7169
var target KotlinTarget
@@ -86,8 +84,6 @@ func (kt *kotlinLang) Resolve(c *config.Config, ix *resolve.RuleIndex, rc *repo.
8684
r.SetAttr("deps", deps)
8785
}
8886
}
89-
90-
BazelLog.Infof("Resolve(%s): //%s:%s DONE in %s", LanguageName, from.Pkg, r.Name(), time.Since(start).String())
9187
}
9288

9389
func (kt *kotlinLang) resolveImports(

language/orion/resolver.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"path"
77
"strings"
8-
"time"
98

109
common "github.com/aspect-build/aspect-gazelle/common"
1110
BazelLog "github.com/aspect-build/aspect-gazelle/common/logger"
@@ -125,8 +124,7 @@ func (re *GazelleHost) Embeds(r *rule.Rule, f label.Label) []label.Label {
125124

126125
// Resolve the dependencies of a rule and apply them to the necessary rule attributes.
127126
func (re *GazelleHost) Resolve(c *config.Config, ix *resolve.RuleIndex, rc *repo.RemoteCache, r *rule.Rule, importData interface{}, from label.Label) {
128-
start := time.Now()
129-
BazelLog.Infof("Resolve(%s): //%s:%s", GazelleLanguageName, from.Pkg, r.Name())
127+
BazelLog.Debugf("Resolve(%s): //%s:%s", GazelleLanguageName, from.Pkg, r.Name())
130128

131129
pluginIdAttr := r.PrivateAttr(targetPluginKey)
132130
if pluginIdAttr == nil {
@@ -176,8 +174,6 @@ func (re *GazelleHost) Resolve(c *config.Config, ix *resolve.RuleIndex, rc *repo
176174
}
177175
}
178176
}
179-
180-
BazelLog.Infof("Resolve(%s): //%s:%s DONE in %s", GazelleLanguageName, from.Pkg, r.Name(), time.Since(start).String())
181177
}
182178

183179
func (re *GazelleHost) resolveImports(

0 commit comments

Comments
 (0)