Skip to content

Commit e99c39b

Browse files
dguidoclaude
andcommitted
fix: Clear existing CryticCompile handlers to prevent INFO messages
Clear all handlers from the CryticCompile logger before adding the WARNING-level handler to prevent any existing handlers from outputting INFO-level messages that would break CI tests comparing output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a37bd71 commit e99c39b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

slither/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,8 @@ def configure_logger(log_level: int = logging.INFO):
11041104
console_handler.setFormatter(FormatterCryticCompile())
11051105

11061106
crytic_compile_error = logging.getLogger("CryticCompile")
1107+
# Clear any existing handlers to prevent duplicate or lower-level logging
1108+
crytic_compile_error.handlers.clear()
11071109
crytic_compile_error.addHandler(console_handler)
11081110
crytic_compile_error.propagate = False
11091111
crytic_compile_error.setLevel(logging.WARNING)

0 commit comments

Comments
 (0)