Python logging made (stupidly) simple
This report summarizes scanner evidence for Delgan/loguru, a Python project with 24,140 GitHub stars. SynthScan examined 26,777 lines of code across 288 source files, recording 561 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 26.1 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 462 finding(s).
Are imports declared and package/API names verified? 12 finding(s).
Are wrappers, guards, and repeated structures necessary? 525 finding(s).
Which changes need focused human review? 561 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 561 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_colorama.py | 44 | def test_stream_wrapped_on_windows_if_no_vt_support(patched, monkeypatch, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 56 | def test_stream_not_wrapped_on_windows_if_vt_support(patched, monkeypatch, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 110 | def test_github_actions_fixed(monkeypatch, patched, expected): | CODE |
| LOW | tests/test_colorama.py | 130 | def test_mintty_fixed_windows(monkeypatch, patched, expected): | CODE |
| LOW | tests/test_colorama.py | 148 | def test_dumb_term_not_colored(monkeypatch, patched, expected): | CODE |
| LOW | tests/test_colorama.py | 173 | def test_honor_no_color_standard(monkeypatch, patched, no_color, expected): | CODE |
| LOW | tests/test_colorama.py | 198 | def test_honor_force_color_standard(monkeypatch, patched, force_color, expected): | CODE |
| LOW | tests/test_colorama.py | 206 | def test_no_color_takes_precedence_over_force_color(monkeypatch): | CODE |
| LOW | tests/test_colorama.py | 232 | def test_mintty_not_fixed_linux(monkeypatch, patched, expected): | CODE |
| LOW | tests/test_colorama.py | 295 | def test_dont_wrap_if_not_original_stdout_or_stderr(monkeypatch, patched, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 305 | def test_dont_wrap_if_terminal_has_vt_support(monkeypatch, patched, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 317 | def test_dont_wrap_if_winapi_false(monkeypatch, patched, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 329 | def test_wrap_if_winapi_true_and_no_vt_support(monkeypatch, patched, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 342 | def test_wrap_if_winapi_true_and_vt_check_fails(monkeypatch, patched, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 355 | def test_wrap_if_winapi_true_and_stream_has_no_fileno(monkeypatch, patched, patch_colorama): | CODE |
| LOW | tests/test_colorama.py | 367 | def test_wrap_if_winapi_true_and_old_colorama_version(monkeypatch, patched, patch_colorama): | CODE |
| LOW⚡ | tests/test_filesink_rotation.py | 1127 | def test_invalid_day_rotation(rotation): | CODE |
| LOW⚡ | tests/test_filesink_rotation.py | 1135 | def test_invalid_time_rotation(rotation): | CODE |
| LOW⚡ | tests/test_filesink_rotation.py | 1141 | def test_invalid_value_size_rotation(rotation): | CODE |
| LOW⚡ | tests/test_filesink_rotation.py | 1147 | def test_invalid_unit_rotation_duration(rotation): | CODE |
| LOW⚡ | tests/test_filesink_rotation.py | 1153 | def test_invalid_value_rotation_duration(rotation): | CODE |
| LOW⚡ | tests/test_filesink_rotation.py | 1159 | def test_out_of_range_rotation_duration(rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 196 | def test_time_rotation_with_tzinfo_diff_bigger(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 219 | def test_time_rotation_with_tzinfo_diff_lower(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 242 | def test_time_rotation_with_tzinfo_utc(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 268 | def test_time_rotation_multiple_days_at_midnight_utc(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 300 | def test_daily_rotation_with_different_timezone(freeze_time, tmp_path, offset): | CODE |
| LOW | tests/test_filesink_rotation.py | 338 | def test_time_rotation_after_positive_timezone_changes_forward(freeze_time, tmp_path, rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 365 | def test_time_rotation_when_positive_timezone_changes_forward(freeze_time, tmp_path, rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 401 | def test_time_rotation_after_negative_timezone_changes_forward(freeze_time, tmp_path, rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 428 | def test_time_rotation_when_negative_timezone_changes_forward(freeze_time, tmp_path, rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 462 | def test_time_rotation_after_positive_timezone_changes_backward_aware( | CODE |
| LOW | tests/test_filesink_rotation.py | 491 | def test_time_rotation_after_positive_timezone_changes_backward_naive( | CODE |
| LOW | tests/test_filesink_rotation.py | 529 | def test_time_rotation_after_negative_timezone_changes_backward_aware( | CODE |
| LOW | tests/test_filesink_rotation.py | 558 | def test_time_rotation_after_negative_timezone_changes_backward_naive( | CODE |
| LOW | tests/test_filesink_rotation.py | 588 | def test_time_rotation_when_timezone_changes_backward_rename_file(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 624 | def test_dont_rotate_earlier_when_utc_is_one_day_before(freeze_time, tmp_path, rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 659 | def test_dont_rotate_later_when_utc_is_one_day_after(freeze_time, tmp_path, rotation): | CODE |
| LOW | tests/test_filesink_rotation.py | 685 | def test_rotation_at_midnight_with_date_in_filename(freeze_time, tmp_path, timezone): | CODE |
| LOW | tests/test_filesink_rotation.py | 707 | def test_time_rotation_reopening_native(tmp_path_local, delay): | CODE |
| LOW | tests/test_filesink_rotation.py | 763 | def test_time_rotation_reopening_xattr_attributeerror(tmp_path_local, monkeypatch, delay): | CODE |
| LOW | tests/test_filesink_rotation.py | 799 | def test_time_rotation_reopening_xattr_oserror(tmp_path_local, monkeypatch, delay): | CODE |
| LOW | tests/test_filesink_rotation.py | 828 | def test_time_rotation_windows_no_setctime(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_filesink_rotation.py | 852 | def test_time_rotation_windows_setctime_exception(tmp_path, monkeypatch, exception): | CODE |
| LOW | tests/test_filesink_rotation.py | 920 | def test_no_rotation_at_remove(tmp_path, mode): | CODE |
| LOW | tests/test_filesink_rotation.py | 928 | def test_rename_existing_with_creation_time(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 944 | def test_renaming_rotation_dest_exists(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 962 | def test_renaming_rotation_dest_exists_with_time(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 982 | def test_exception_during_rotation(tmp_path, capsys): | CODE |
| LOW | tests/test_filesink_rotation.py | 1001 | def test_exception_during_rotation_not_caught(tmp_path, capsys): | CODE |
| LOW | tests/test_filesink_rotation.py | 1020 | def test_recipe_rotation_both_size_and_time(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 1067 | def test_multiple_rotation_conditions(freeze_time, tmp_path): | CODE |
| LOW | tests/test_filesink_rotation.py | 1092 | def test_empty_rotation_condition_list(): | CODE |
| LOW | tests/test_filesink_rotation.py | 1100 | def test_invalid_rotation_type(rotation): | CODE |
| LOW | tests/test_add_option_serialize.py | 29 | def test_serialize_non_ascii_characters(): | CODE |
| LOW | tests/test_add_option_serialize.py | 60 | def test_serialize_exception_without_context(): | CODE |
| LOW | tests/test_add_option_serialize.py | 77 | def test_serialize_exception_none_tuple(): | CODE |
| LOW | tests/test_add_option_serialize.py | 94 | def test_serialize_exception_instance(): | CODE |
| LOW | tests/test_add_option_serialize.py | 111 | def test_serialize_with_catch_decorator(): | CODE |
| LOW | tests/test_add_option_serialize.py | 127 | def test_serialize_with_record_option(): | CODE |
| 374 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/conftest.py | 264 | except ValueError: | CODE |
| HIGH | tests/test_type_hinting.py | 9 | except ImportError: | CODE |
| HIGH | …ptions/source/others/exception_formatting_generator.py | 21 | except StopIteration: | CODE |
| HIGH | …ptions/source/others/exception_formatting_coroutine.py | 21 | except StopIteration: | CODE |
| HIGH | …/exceptions/source/others/broken_but_decorated_repr.py | 26 | except ValueError: | CODE |
| HIGH | …/exceptions/source/others/broken_but_decorated_repr.py | 32 | except ValueError: | CODE |
| HIGH | …s/exceptions/source/others/sys_tracebacklimit_unset.py | 54 | except AttributeError: | CODE |
| HIGH | …s/exceptions/source/modern/decorate_async_generator.py | 55 | except ValueError: | CODE |
| HIGH | …s/exceptions/source/modern/decorate_async_generator.py | 77 | except StopAsyncIteration: | CODE |
| HIGH | …s/exceptions/source/modern/decorate_async_generator.py | 96 | except StopAsyncIteration: | CODE |
| HIGH | …s/exceptions/source/modern/decorate_async_generator.py | 109 | except ValueError: | CODE |
| HIGH | …s/exceptions/source/modern/decorate_async_generator.py | 117 | except StopAsyncIteration: | CODE |
| HIGH | …e/modern/exception_formatting_async_generator_throw.py | 23 | except StopIteration: | CODE |
| HIGH | …e/modern/exception_formatting_async_generator_throw.py | 29 | except StopAsyncIteration: | CODE |
| HIGH | …/source/modern/exception_formatting_async_generator.py | 21 | except StopAsyncIteration: | CODE |
| HIGH | loguru/_colorama.py | 32 | except Exception: | CODE |
| HIGH | loguru/_logger.py | 1356 | except StopAsyncIteration: | CODE |
| HIGH | loguru/_logger.py | 1364 | except StopAsyncIteration: | CODE |
| HIGH | loguru/_simple_sinks.py | 194 | except Exception: | CODE |
| HIGH | loguru/_string_parsers.py | 312 | except ValueError: | CODE |
| HIGH | loguru/_error_interceptor.py | 31 | except OSError: | CODE |
| HIGH | loguru/_ctime_functions.py | 17 | except (OSError, ValueError): | CODE |
| HIGH | loguru/_ctime_functions.py | 43 | except OSError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_opt.py | 68 | except Exception: | CODE |
| LOW | tests/test_opt.py | 82 | except Exception: | CODE |
| LOW | tests/test_opt.py | 98 | except Exception: | CODE |
| LOW | tests/test_opt.py | 114 | except Exception: | CODE |
| LOW | tests/test_interception.py | 110 | except Exception: | CODE |
| LOW | tests/test_add_option_diagnose.py | 10 | except Exception: | CODE |
| LOW | tests/test_add_option_diagnose.py | 20 | except Exception: | CODE |
| LOW | tests/test_exceptions_catch.py | 75 | except Exception: | CODE |
| LOW | tests/test_exceptions_catch.py | 91 | except Exception: | CODE |
| LOW | tests/test_add_option_enqueue.py | 263 | except Exception: | CODE |
| LOW | tests/test_add_option_enqueue.py | 286 | except Exception: | CODE |
| LOW | tests/test_propagation.py | 89 | except Exception: | CODE |
| LOW | tests/test_add_option_backtrace.py | 10 | except Exception: | CODE |
| LOW | tests/test_add_option_backtrace.py | 20 | except Exception: | CODE |
| LOW⚡ | tests/test_exceptions_formatting.py | 288 | except Exception: | CODE |
| LOW | …tions/source/backtrace/missing_lineno_frame_objects.py | 40 | except Exception as e: | CODE |
| LOW | tests/exceptions/source/backtrace/nested_wrapping.py | 32 | except Exception: | CODE |
| LOW | …exceptions/source/backtrace/nested_chained_catch_up.py | 23 | except Exception as e: | CODE |
| MEDIUM | …exceptions/source/backtrace/nested_chained_catch_up.py | 20 | def main(): | CODE |
| LOW | tests/exceptions/source/others/repeated_lines.py | 22 | except Exception: | CODE |
| LOW | tests/exceptions/source/others/one_liner_recursion.py | 15 | except Exception: | CODE |
| LOW | tests/exceptions/source/others/recursion_error.py | 20 | except Exception: | CODE |
| LOW | tests/exceptions/source/others/nested_with_reraise.py | 21 | except Exception as e: | CODE |
| MEDIUM | tests/exceptions/source/others/nested_with_reraise.py | 18 | def bar(x, y): | CODE |
| LOW | tests/exceptions/source/diagnose/chained_both.py | 16 | except Exception: | CODE |
| LOW | tests/exceptions/source/diagnose/chained_both.py | 23 | except Exception as e: | CODE |
| MEDIUM | tests/exceptions/source/diagnose/chained_both.py | 13 | def cause(x, y): | CODE |
| MEDIUM | tests/exceptions/source/diagnose/chained_both.py | 20 | def context(x, y): | CODE |
| LOW⚡ | tests/exceptions/source/modern/grouped_simple.py | 27 | except Exception as error_1: | CODE |
| LOW⚡ | tests/exceptions/source/modern/grouped_simple.py | 30 | except Exception as error_2: | CODE |
| LOW⚡ | tests/exceptions/source/modern/grouped_simple.py | 33 | except Exception as error_3: | CODE |
| MEDIUM | tests/exceptions/source/modern/grouped_simple.py | 24 | def main(): | CODE |
| LOW⚡ | …ptions/source/modern/grouped_with_cause_and_context.py | 18 | except Exception as err: | CODE |
| LOW⚡ | …ptions/source/modern/grouped_with_cause_and_context.py | 20 | except Exception as err: | CODE |
| LOW⚡ | …ptions/source/modern/grouped_with_cause_and_context.py | 25 | except Exception as err: | CODE |
| LOW⚡ | …ptions/source/modern/grouped_with_cause_and_context.py | 27 | except Exception as err: | CODE |
| LOW⚡ | …ptions/source/modern/grouped_with_cause_and_context.py | 32 | except Exception as err: | CODE |
| LOW⚡ | …ptions/source/modern/grouped_with_cause_and_context.py | 35 | except Exception: | CODE |
| MEDIUM | …ptions/source/modern/grouped_with_cause_and_context.py | 14 | def main(): | CODE |
| LOW⚡ | tests/exceptions/source/modern/grouped_nested.py | 18 | except Exception as err: | CODE |
| LOW⚡ | tests/exceptions/source/modern/grouped_nested.py | 23 | except Exception as err: | CODE |
| LOW⚡ | tests/exceptions/source/modern/grouped_nested.py | 30 | except Exception as err: | CODE |
| MEDIUM | tests/exceptions/source/modern/grouped_nested.py | 14 | def main(): | CODE |
| LOW⚡ | …ceptions/source/modern/grouped_as_cause_and_context.py | 21 | except Exception as err: | CODE |
| LOW⚡ | …ceptions/source/modern/grouped_as_cause_and_context.py | 26 | except Exception as err: | CODE |
| LOW⚡ | …ceptions/source/modern/grouped_as_cause_and_context.py | 32 | except Exception as err: | CODE |
| LOW⚡ | …ceptions/source/modern/grouped_as_cause_and_context.py | 34 | except Exception as err: | CODE |
| MEDIUM | …ceptions/source/modern/grouped_as_cause_and_context.py | 18 | def main(): | CODE |
| LOW | loguru/_better_exceptions.py | 353 | except Exception: | CODE |
| MEDIUM | loguru/_better_exceptions.py | 193 | def _get_char(self, char, default): | CODE |
| LOW | loguru/_handler.py | 207 | except Exception: | CODE |
| LOW | loguru/_handler.py | 319 | except Exception: | CODE |
| LOW | loguru/_handler.py | 334 | except Exception: | CODE |
| MEDIUM | loguru/_handler.py | 127 | def emit(self, record, level_id, from_decorator, is_raw, colored_message): | CODE |
| LOW | loguru/_colorama.py | 32 | except Exception: | CODE |
| LOW | loguru/_colorama.py | 53 | except Exception: | CODE |
| LOW | loguru/_colorama.py | 76 | except Exception: | CODE |
| LOW | loguru/_simple_sinks.py | 194 | except Exception: | CODE |
| LOW | loguru/_error_interceptor.py | 26 | except Exception: | CODE |
| LOW | loguru/_get_frame.py | 8 | except Exception: | CODE |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | loguru/_better_exceptions.py | 72 | CODE | |
| LOW | loguru/_better_exceptions.py | 210 | CODE | |
| LOW | loguru/_better_exceptions.py | 275 | CODE | |
| LOW | loguru/_better_exceptions.py | 361 | CODE | |
| LOW | loguru/_better_exceptions.py | 401 | CODE | |
| LOW | loguru/_colorizer.py | 222 | CODE | |
| LOW | loguru/_colorizer.py | 416 | CODE | |
| LOW | loguru/_colorizer.py | 477 | CODE | |
| LOW | loguru/_handler.py | 127 | CODE | |
| LOW | loguru/_file_sink.py | 381 | CODE | |
| LOW | loguru/_logger.py | 273 | CODE | |
| LOW | loguru/_logger.py | 1185 | CODE | |
| LOW | loguru/_logger.py | 1892 | CODE | |
| LOW | loguru/_logger.py | 2059 | CODE | |
| LOW | loguru/_logger.py | 1322 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/exceptions/source/ownership/callback.py | 3 | CODE | |
| LOW | …ts/exceptions/source/ownership/assertion_from_local.py | 3 | CODE | |
| LOW | …ts/exceptions/source/ownership/assertion_from_local.py | 4 | CODE | |
| LOW | tests/exceptions/source/ownership/assertion_from_lib.py | 3 | CODE | |
| LOW | tests/exceptions/source/ownership/syntaxerror.py | 3 | CODE | |
| LOW | tests/exceptions/source/ownership/decorated_callback.py | 3 | CODE | |
| LOW | tests/exceptions/source/ownership/decorated_callback.py | 4 | CODE | |
| LOW | tests/exceptions/source/ownership/catch_decorator.py | 3 | CODE | |
| LOW | tests/exceptions/source/ownership/indirect.py | 3 | CODE | |
| LOW | …xceptions/source/ownership/catch_decorator_from_lib.py | 3 | CODE | |
| LOW | tests/exceptions/source/ownership/string_lib.py | 3 | CODE | |
| LOW | tests/exceptions/source/ownership/direct.py | 3 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_multiprocessing.py | 26 | def do_something(i): | CODE |
| LOW⚡ | tests/test_repr.py | 84 | def test_function(): | CODE |
| LOW⚡ | tests/test_repr.py | 85 | def my_function(message): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | loguru/_better_exceptions.py | 151 | CODE | |
| LOW | loguru/_file_sink.py | 169 | CODE | |
| LOW | loguru/_logger.py | 273 | CODE | |
| LOW | loguru/_logger.py | 1390 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 81 | # The theme to use for HTML and HTML Help pages. See the documentation for | COMMENT |
| LOW | docs/conf.py | 101 | # defined by theme itself. Builtin themes are using these templates by | COMMENT |
| LOW | docs/conf.py | 121 | # | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | loguru/_logger.py | 785 | Windows, don't forget to restart your terminal for the change to be taken into account. | CODE |
| LOW | loguru/_logger.py | 1743 | >>> logger.info("While publishing a library, don't forget to disable logging") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_template_strings.py | 18 | # We can't just use t"2**8 = {2**8}", because its a syntax error before python-3.14. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | loguru/__init__.py | 16 | __all__ = ["logger"] | CODE |