File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 PlainSyntaxError ,
3838)
3939from plain2code_logger import (
40+ LOGGER_NAME ,
4041 CrashLogHandler ,
4142 IndentedFormatter ,
42- RetryOnlyFilter ,
4343 TuiLoggingHandler ,
4444 dump_crash_logs ,
4545 get_log_file_path ,
46- LOGGER_NAME ,
4746)
4847from plain2code_state import RunState
4948from plain2code_utils import print_dry_run_output
Original file line number Diff line number Diff line change 99LOGGER_NAME = "codeplain"
1010
1111
12- class RetryOnlyFilter (logging .Filter ):
13- def filter (self , record ):
14- # Allow all logs with level > DEBUG (i.e., INFO and above)
15- if record .levelno > logging .DEBUG :
16- return True
17- # For DEBUG logs, only allow if message matches retry-related patterns
18- msg = record .getMessage ().lower ()
19- return (
20- "retrying due to" in msg
21- or "raising timeout error" in msg
22- or "raising connection error" in msg
23- or "encountered exception" in msg
24- or "retrying request" in msg
25- or "retry left" in msg
26- or "1 retry left" in msg
27- or "retries left" in msg
28- )
29-
30-
3112class IndentedFormatter (logging .Formatter ):
3213 def format (self , record ):
3314 original_message = record .getMessage ()
You can’t perform that action at this time.
0 commit comments