Projects · What I'm known for

LogEye

Stable 2026 – now Author and maintainer

Runtime introspection logger for Python. Decorate a function and watch every assignment, mutation, call and return as it happens, no debugger needed.

LogEye is print debugging, automated. Drop @log on a function (or wrap a value in log()) and it reports variable assignments, attribute writes, container mutations, arguments and return values as the code runs, with file and line for each event.

from logeye import log

@log
def add(a, b):
    return a + b

add(2, 3)

How it works#

  • Tracing is built on sys.settrace, scoped to the decorated code so the rest of the program runs untouched.
  • Variable names are inferred from the call site by walking the AST, including assignments that span multiple lines.
  • Wrapped objects, lists, dicts and sets report their own mutations, recursively for nested structures.
  • Output is filterable by level and variable, and can go to stdout or a file.

Educational mode#

With mode="edu", the trace is rewritten into plain sentences ("Calling add(2, 3)", "add(2, 3) returned 5"). It turns an algorithm run into something a student can read top to bottom, which is who I originally built it for: people learning algorithms and the teachers explaining them.

About 4,700 lines across 12 modules, with 16 test modules and 16 runnable demos.