Skip to content

Commit 5b7704d

Browse files
authored
fix(misconf): Improve logging for unsupported checks (#8634)
1 parent 1bf0117 commit 5b7704d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/iac/rego/load.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ func (s *Scanner) fallbackChecks(compiler *ast.Compiler) {
165165
continue
166166
}
167167

168-
s.logger.Error(
169-
"Error occurred while parsing. Trying to fallback to embedded check",
168+
s.logger.Debug(
169+
"Unable to parse check. This can be due to lack of support in this version. Trying to fallback to embedded check",
170170
log.FilePath(loc),
171171
log.Err(e),
172172
)
173173

174174
embedded := s.findMatchedEmbeddedCheck(badPolicy)
175175
if embedded == nil {
176-
s.logger.Error("Failed to find embedded check, skipping", log.FilePath(loc))
176+
s.logger.Debug("Failed to find embedded check, skipping", log.FilePath(loc))
177177
continue
178178
}
179179

0 commit comments

Comments
 (0)