Skip to content

Releases: MattFor/LogEye

v1.5.1

30 Mar 21:09
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Fixed

  • _infer_name_from_frame incorrectly returning "set" as a default option when literally nothing is found,
    instead it now returns None so that the pipe operator single messages work correctly,
    also adjusted the default to be PLACEHOLDER and not "set" to avoid confusion
  • Fixed incorrect self-referencing of basic types

Changed

  • Updated examples
  • Better formatting in educational mode
  • Better formatting in code

v1.5.0

27 Mar 16:46

Choose a tag to compare

Added

  • Global variable tracking improvements

    • var = log(val) now reliably registers variables for continuous tracking
    • Improved watcher integration with global trace system
      For example:
      x = "xyz" | l
      
      x = 10
      x = {"a": 1, "b": 2}
      x = "xyz"
      Completely automatically does this!
      [0.000s] demo1.py:15 (set) x = 'xyz'
      [0.000s] demo1.py:18 (change) x = 10
      [0.000s] demo1.py:19 (change) x = {'a': 1, 'b': 2}
      [0.000s] demo1.py:21 (change) x = 'xyz'
      
  • Class instrumentation (@log on classes)

    • Logs __init__ calls with arguments

    • Tracks attribute assignments on instances

    • Supports mutation detection:

      • (set) for first assignment
      • (change) for updates
    • Attribute deletion tracking (<deleted>)

    • Private attributes are now logged with <priv> prefix
      Automatic garbage noise differentiation between _hidden and _stdlibstuff!

  • Deep nested structure tracking

    • Enables mutation logging like:

      • obj.user["name"] = ...
      • obj.items.append(...)
  • log and l unification

    • Both log and l now refer to the same function
    • log is now the preferred function for logging
    • l is preferred for pipe operations
    x = "xyz" | l # For tracking variables
    log("X is $x") # For manual logging
  • Full class method logging

    • Methods inside @log classes are now fully traced

    • Includes:

      • method calls ((call) obj.method)
      • returns ((return) obj.method -> value)
      • internal state mutations during method execution
    • Class instances now behave like fully traceable execution scopes

  • Directional flow indicators

    • Introduced clearer execution flow markers:

      • -> for outputs / returns
      • <- (internally / structurally) for flow consistency
    • Improves readability of execution traces, especially for nested calls

  • Educational mode improvements

    • Better alignment with real execution order:

      • Calling → state changes → return
    • More consistent variable display (x = value)

    • Reduced ambiguity between definition vs mutation

    • Cleaner, more predictable output for testing

Changed

  • Stricter and expanded test suite

    • Standardised output capturing using capture(capsys)
    • Introduced reusable assertion helpers across all test files
  • Educational test expectations tightened

    • Tests now assert:

      • exact number of lines
      • exact ordering of events
    • Prevents regression via accidental extra logs

  • Formatting consistency overhaul

    • Unified output across:
      • message logging
      • function tracing
      • object mutations
    • Reduced inconsistencies between different logging paths

Fixed

  • Nested function names appearing incorrectly (e.g. test_x.outer.inner)
  • Duplicate function definition emissions (Defined inner() appearing twice)
  • Missing default arguments in nested function definitions
  • Incorrect ordering of:
    • Calling inner()
    • Defined outer.inner(...)
  • Lambda logging inconsistencies (missing or duplicated outputs)
  • Variable tracking inside nested scopes
  • Attribute access issues when wrapping class instances
  • Broken method calls on logged class instances (LoggedObject conflicts)
  • Nested structure mutations not being tracked correctly
  • List/dict attributes not emitting mutation events
  • Recursion errors in self-referencing structures
  • Mixed formatting ({} + $var) not expanding correctly
  • Pipe operator edge cases and name inference issues

Discovered Limitations

  • C-based decorators (e.g. functools.lru_cache)

    • Inner execution cannot be traced due to lack of Python-level introspection
  • Nested assignment unpacking

    • Complex patterns like:

      (a, (b, c)) = ...
    • Only partially tracked due to Python runtime limitations (no full AST access)
      However! I will be getting to this soon!

Dev

  • Significantly expanded test suite for edge cases and complex scenarios
  • Improved internal structure for future features (method tracing, advanced introspection)
  • Added multiple branches for easier separation:
    • master -> stable
    • dev -> development
    • readme-changelog -> documentation
    • feature -> feature branches
    • tests -> test coverage
    • demos -> demos and examples

Plans

  • Repeated identical assignments edge case

    • Intended behavior:

      x = "a" | l
      x = "a"
      x = "a"

      should produce:

      (set) x = 'a'
      (change) x = 'a'
      (change) x = 'a'
      
    • Currently not fully implemented in all paths

  • Upcoming feature plans are now just the sub-branches on the features/ branch.

  • Standardising and improving demos and documentation


v1.4.0

24 Mar 17:58

Choose a tag to compare

Added

  • Educational mode now includes clear return output:
    • (function) returned (value) style formatting for better readability
  • Integrated Ruff for consistent formatting and linting
  • Added basedpyright for static type checking
  • Introduced initial type annotations across the codebase
  • Improved educational mode examples in README and demos

Changed

  • Improved consistency of call and return formatting
  • Updated publishing pipeline:
    • automatic Ruff formatting
    • lint + type checks during release
  • Internal refactors to support typing and future maintainability

Fixed

  • Various formatting inconsistencies between full and educational modes
  • Edge cases in return logging output
  • Minor issues in logging behaviour uncovered during type integration

Developer Experience

  • Added Ruff integration for standardised code style
  • Added basedpyright integration for type safety
  • Improved contribution workflow and code consistency

Plans

  • Multithreading support!

v1.3.2

24 Mar 06:08

Choose a tag to compare

Added

  • set_mode() for setting the mode globally (f.e to education)
  • More tests for the global mode setting

Improved

  • README examples

v1.3.1

24 Mar 04:33

Choose a tag to compare

Added

  • Comprehensive README overhaul with clearer structure and examples

Dev / Tooling

  • Improved release pipeline with automated versioning and GitHub releases

v1.3.0

24 Mar 03:38

Choose a tag to compare

Added

  • Educational logging mode (mode="edu")

    • Human-readable, step-by-step output for learning and algorithm tracing

    • Function calls rendered as:

      Calling foo(1, b=2)
      
    • Automatic argument formatting (args + kwargs)

    • Omits empty kwargs

  • Nested function call tracing

    • Logs calls inside functions (e.g. outer.inner())
  • Context-aware logging

    • log() inside decorated functions now inherits:

      • mode
      • show_time
      • show_file
      • show_lineno

Improved

  • Output clarity in educational mode

    • Removed internal noise (<func ...>, debug artifacts)

    • Simplified function names (no test/module prefixes)

    • More natural mutation messages:

      Added 5 to arr -> [1, 2, 5]
      

Fixed

  • Formatter crash (UnboundLocalError: prefix)
  • Incorrect call argument display ({'args': ..., 'kwargs': ...})
  • Missing nested call events due to tracer scope issues

Tests

  • Added educational mode test coverage:

    • Call formatting
    • Argument rendering
    • Nested function tracing
    • Inherited logging behavior
    • Human-readable mutations
    • Output cleanliness