- New
nfo.metricsmodule with Counter, Gauge, Histogram metrics collection - New
nfo.analyticsmodule for log analysis (trends, anomalies, aggregations) - New
nfo.contextmodule with context managers (log_context, temp_level, temp_sink, silence, span) - New
get_config()function innfo.configure - Auto-commit and push in pyqual pipeline after successful gates
- Fixed TODO items: return types in demo/app.py and examples
- Fixed magic numbers replaced with constants in examples
- Fixed duplicate imports in demo/load_generator.py
- Fixed pytest-asyncio warnings with explicit fixture scope
- Fixed vallm validation errors with --no-imports flag
- Added get_default_logger to public API exports
- Enhanced pyqual.yaml with deploy stage for automatic git push
- All pyqual gates now passing (CC: 3.7, critical: 0, tests: 339)
- Update CHANGELOG.md
- Update TODO.md
- Update nfo/main.py
- Update nfo/decorators/_extract.py
- Update nfo/extractors.py
- Update nfo/log_flow.py
- Update nfo/terminal.py
- Update planfile.yaml
- Update prefact.yaml
- Update project.sh
- Update project/validation.toon.yaml
- Fix duplicate-imports issues (ticket-996e3777)
- Fix smart-return-type issues (ticket-ceca156b)
- Fix string-concat issues (ticket-2447e6cc)
- Fix ai-boilerplate issues (ticket-67c10259)
- Fix magic-numbers issues (ticket-e1e1d16c)
- Fix ai-boilerplate issues (ticket-9115e565)
- Fix magic-numbers issues (ticket-8716e39b)
- Fix ai-boilerplate issues (ticket-7317dadf)
- Fix string-concat issues (ticket-642a527b)
- Fix unused-imports issues (ticket-ff925dbe)
- Fix ai-boilerplate issues (ticket-d50f9255)
- Fix smart-return-type issues (ticket-210effd6)
- Fix string-concat issues (ticket-ca3c34ae)
- Fix ai-boilerplate issues (ticket-fcda95b2)
- Fix smart-return-type issues (ticket-dc7983ac)
- Fix string-concat issues (ticket-049b8426)
- Fix unused-imports issues (ticket-2b2ca4d2)
- Fix magic-numbers issues (ticket-ac6ce058)
- Fix llm-generated-code issues (ticket-8c1984e9)
- Fix ai-boilerplate issues (ticket-bad6cc8e)
- Fix smart-return-type issues (ticket-db9328c8)
- Fix ai-boilerplate issues (ticket-0d7d2647)
- Fix smart-return-type issues (ticket-fc99f384)
- Fix ai-boilerplate issues (ticket-5aa73546)
- Fix smart-return-type issues (ticket-0570d306)
- Fix magic-numbers issues (ticket-7de654e8)
- Fix ai-boilerplate issues (ticket-b9c68db7)
- Fix magic-numbers issues (ticket-0ecd0c2a)
- Fix ai-boilerplate issues (ticket-dfd961fc)
- Fix smart-return-type issues (ticket-ad9c0a5b)
- Fix string-concat issues (ticket-88d82026)
- Fix magic-numbers issues (ticket-fa378406)
- Fix llm-generated-code issues (ticket-3a12ba6f)
- Fix ai-boilerplate issues (ticket-8070c897)
- Fix magic-numbers issues (ticket-30dcc156)
- Fix ai-boilerplate issues (ticket-55223232)
- Fix smart-return-type issues (ticket-eb18bf91)
- Fix unused-imports issues (ticket-6702ace2)
- Fix magic-numbers issues (ticket-d65e0e0f)
- Fix ai-boilerplate issues (ticket-c9f4ea89)
- Fix unused-imports issues (ticket-d4cfc6c0)
- Fix magic-numbers issues (ticket-5ca2ed3c)
- Fix ai-boilerplate issues (ticket-d24b721d)
- Fix magic-numbers issues (ticket-1bf162c2)
- Fix smart-return-type issues (ticket-9a6edafe)
- Fix string-concat issues (ticket-b0f0db2b)
- Fix unused-imports issues (ticket-31ed21cf)
- Fix llm-hallucinations issues (ticket-15d30c1d)
- Fix llm-generated-code issues (ticket-d8386f7b)
- Fix smart-return-type issues (ticket-56e3e59b)
- Fix unused-imports issues (ticket-12379ec5)
- Fix magic-numbers issues (ticket-e2a09748)
- Fix ai-boilerplate issues (ticket-d1849036)
- Fix ai-boilerplate issues (ticket-b49f1e86)
- Fix magic-numbers issues (ticket-5a5d66ad)
- Fix ai-boilerplate issues (ticket-125d7ab8)
- Fix string-concat issues (ticket-c817a5db)
- Fix magic-numbers issues (ticket-79fbd55d)
- Fix ai-boilerplate issues (ticket-ee78f1e9)
- Fix unused-imports issues (ticket-53bc2e30)
- Fix llm-generated-code issues (ticket-13da8d34)
- Fix unused-imports issues (ticket-624a35d1)
- Fix llm-generated-code issues (ticket-eed0a900)
- Fix unused-imports issues (ticket-736bbd8b)
- Fix llm-generated-code issues (ticket-b67f5af3)
- Fix unused-imports issues (ticket-feef05c1)
- Fix magic-numbers issues (ticket-ae6380cf)
- Fix ai-boilerplate issues (ticket-65c34093)
- Fix relative-imports issues (ticket-325d19c6)
- Fix unused-imports issues (ticket-d672145a)
- Fix unused-imports issues (ticket-d418b387)
- Fix duplicate-imports issues (ticket-e14bb5db)
- Fix smart-return-type issues (ticket-64939a2f)
- Fix unused-imports issues (ticket-f987595a)
- Fix duplicate-imports issues (ticket-0eeeccb9)
- Fix magic-numbers issues (ticket-95e2cbfe)
- Fix ai-boilerplate issues (ticket-270e14b5)
- Fix relative-imports issues (ticket-f8c70912)
- Fix unused-imports issues (ticket-bc92c92b)
- Fix string-concat issues (ticket-1ab3658f)
- Fix unused-imports issues (ticket-01599cd4)
- Fix duplicate-imports issues (ticket-c2774ab7)
- Fix magic-numbers issues (ticket-beb5fec1)
- Fix llm-generated-code issues (ticket-a9e00942)
- Fix unused-imports issues (ticket-255d3e6d)
- Fix relative-imports issues (ticket-05fa2561)
- Fix unused-imports issues (ticket-964beb66)
- Fix llm-generated-code issues (ticket-950dc645)
- Fix unused-imports issues (ticket-52cc7bdd)
- Fix relative-imports issues (ticket-abec993c)
- Fix unused-imports issues (ticket-d5eba924)
- Fix llm-generated-code issues (ticket-c17b09f5)
- Fix string-concat issues (ticket-113c9f73)
- Fix unused-imports issues (ticket-bb65ec30)
- Fix magic-numbers issues (ticket-d21ea20d)
- Fix llm-generated-code issues (ticket-a9b1e86b)
- Fix string-concat issues (ticket-6dea0db3)
- Fix unused-imports issues (ticket-35ee1785)
- Fix magic-numbers issues (ticket-5189fe26)
- Fix llm-generated-code issues (ticket-028d82e0)
- Fix unused-imports issues (ticket-9e98330b)
- Fix magic-numbers issues (ticket-f91c6161)
- Fix string-concat issues (ticket-80e24290)
- Fix unused-imports issues (ticket-d19eb691)
- Fix llm-generated-code issues (ticket-68d21b21)
- Fix string-concat issues (ticket-d3f748e6)
- Fix unused-imports issues (ticket-d2146e76)
- Fix magic-numbers issues (ticket-e56f6c98)
- Fix llm-generated-code issues (ticket-d314854b)
- Fix unused-imports issues (ticket-e6d1a5f2)
- Fix magic-numbers issues (ticket-68d8f1c4)
- Fix llm-generated-code issues (ticket-686e6e99)
- Fix unused-imports issues (ticket-91b55c94)
- Fix llm-generated-code issues (ticket-22992e35)
- Fix unused-imports issues (ticket-92c44ef3)
- Fix unused-imports issues (ticket-9f9f152b)
- Fix llm-generated-code issues (ticket-f967edee)
- Fix unused-imports issues (ticket-a0c930f0)
- Fix unused-imports issues (ticket-a32f9ac6)
- Fix string-concat issues (ticket-5ccefd01)
- Fix unused-imports issues (ticket-1108000a)
- Fix magic-numbers issues (ticket-70ce405f)
- Fix unused-imports issues (ticket-e8338705)
- Fix llm-generated-code issues (ticket-54972783)
- Fix string-concat issues (ticket-7c64ac9d)
- Fix unused-imports issues (ticket-f876e599)
- Fix llm-generated-code issues (ticket-adbcb04a)
- Fix unused-imports issues (ticket-d5267bce)
- Fix llm-generated-code issues (ticket-5d7769a7)
- Fix string-concat issues (ticket-2035ffa4)
- Fix unused-imports issues (ticket-46f5667d)
- Fix ai-boilerplate issues (ticket-055af3ed)
- Fix duplicate-imports issues (ticket-2f0574a0)
- Fix unused-imports issues (ticket-eb31ef75)
- Fix magic-numbers issues (ticket-380fbba4)
- Fix llm-generated-code issues (ticket-7f3cedc7)
- Fix string-concat issues (ticket-314f9a6a)
- Fix unused-imports issues (ticket-a0bb689f)
- Fix duplicate-imports issues (ticket-d9b5a030)
- Fix magic-numbers issues (ticket-b6f9211c)
- Fix llm-generated-code issues (ticket-0ddba9ff)
- Update README.md
- Update project/README.md
- Update project/context.md
- Update .gitignore
- Update demo/.gitignore
- Update nfo/.gitignore
- Update project.sh
- Update project/analysis.toon.yaml
- Update project/calls.mmd
- Update project/calls.png
- Update project/compact_flow.mmd
- Update project/compact_flow.png
- Update project/duplication.toon.yaml
- ... and 7 more files
refactor(build): code analysis engine
- docs: update README
- docs: update context.md
- config: update ci.yml
- update nfo/configure.py
- update nfo/decorators.py
- update nfo/decorators/init.py
- update nfo/decorators/_catch.py
- update nfo/decorators/_core.py
- update nfo/decorators/_decision.py
- update nfo/decorators/_extract.py
- update nfo/decorators/_log_call.py
- update nfo/log_flow.py
- update project/analysis.toon
- ... and 3 more
fix(nfo): deep code analysis engine with 5 supporting modules
- update nfo/init.py
- update nfo/fastapi_middleware.py
feat(tests): multi-language support with 3 supporting modules
- update demo/tests/test_demo.py
- update nfo/init.py
- update nfo/tests/test_nfo.py
feat(tests): configuration management system
- update tests/conftest.py
- update tests/test_log_flow.py
- update pyproject.toml
- update nfo/init.py
- update nfo/log_flow.py
feat(tests): deep code analysis engine
- update tests/test_decision_log.py
- update tests/test_pipeline_sink.py
fix(docs): deep code analysis engine with 6 supporting modules
- update tests/test_pipeline_sink.py
- update nfo/init.py
- update nfo/decorators.py
- update nfo/pipeline_sink.py
- update project.functions.toon
- update project.toon
feat(pipeline): PipelineSink, @decision_log, global auto_extract_meta
PipelineSink(nfo/pipeline_sink.py) — groups LogEntry objects bypipeline_run_idand renders pipeline ticks as box-drawing terminal blocks with step timings, metrics, decisions, costs, and error context.@decision_logdecorator (nfo/decorators.py) — logs conditional decisions with structureddecision/reasonfields inentry.extra.- Global
auto_extract_meta—_maybe_extract()in decorators now falls back to the globalauto_extract_metaflag fromconfigure(), so all@log_callsites automatically extract metadata for large args without per-decorator changes. get_global_auto_extract_meta()innfo/configure.py.- Exports:
PipelineSink,decision_logadded to__init__.pyand__all__.
- 23 new tests in
tests/test_pipeline_sink.py(basic, rendering, color, timeout, multi-run, footer, delegate). - Full suite: 296 passed.
feat(config): configuration management system
- update nfo/configure.py
- update nfo/decorators.py
refactor(config): CLI interface improvements
- update tests/test_click_integration.py
- update pyproject.toml
- update project.functions.toon
- update project.toon
refactor(goal): CLI interface improvements
- docs: update README
- update tests/test_click_integration.py
- update tests/test_terminal.py
- update examples/click-integration/demo_basic.py
- update examples/click-integration/demo_configure.py
- update examples/click-integration/demo_formats.py
- update nfo/init.py
- update nfo/click.py
- update nfo/configure.py
- update nfo/terminal.py
- update project.functions.toon
- update project.toon
feat(meta): Binary data logging strategy — log metadata instead of raw data
ThresholdPolicy(nfo/meta.py) — size-based policy deciding when to log full data vs extracted metadata; configurablemax_arg_bytes,max_return_bytes,max_total_bytes,binary_thresholdMetaExtractor(nfo/extractors.py) — intelligent type detection and metadata extraction for binary payloads:- Image meta (PNG/JPEG/BMP): format, dimensions, size, SHA-256 prefix
- Audio meta (WAV): channels, sample rate, bits per sample, duration
- Binary meta: format detection via magic bytes, entropy, compression detection
- File handle meta: name, mode, position, size (without reading contents)
- NumPy ndarray meta (duck-typed): shape, dtype, size, min/max/mean
- Pandas DataFrame meta (duck-typed): shape, columns, dtypes, memory, nulls
register_extractor()/unregister_all_extractors()for custom type support
@meta_log(nfo/meta_decorators.py) — dedicated decorator for binary data pipelines; never logs rawbytes/bytearrayabove threshold; supports sync + async, customextract_fields, per-argument extractorsBinaryAwareRouter(nfo/binary_router.py) — sink that routes log entries based on payload characteristics: meta-log entries → lightweight sink, large binary data → heavy sink, normal entries → full sink@log_call(extract_meta=True)— opt-in metadata extraction in existing decorator; zero breaking changes; optionalmeta_policyparameter@catch(extract_meta=True)— same integration for@catchdecoratorconfigure(meta_policy=..., auto_extract_meta=True)— global configuration for metadata extraction- Environment variables:
NFO_META_THRESHOLD(bytes),NFO_META_EXTRACT(true/false) AsyncBufferedSink(nfo/buffered_sink.py) — background-thread batched writes; configurablebuffer_size,flush_interval,flush_on_error; auto-flush on ERROR/CRITICAL; manualflush()andpendingpropertyRingBufferSink(nfo/ring_buffer_sink.py) — in-memory ring buffer (configurable capacity) that flushes context to delegate on ERROR/CRITICAL; zero disk I/O during normal operation; customizabletrigger_levelsandinclude_triggersample_rateparameter on@log_call,@catch, and@meta_log— fraction of calls to log (0.0–1.0); errors are always logged regardless of sampling- 111 new tests across 8 test files:
test_meta.py(20),test_extractors.py(30),test_meta_decorators.py(20),test_binary_router.py(9),test_buffered_sink.py(11),test_ring_buffer_sink.py(13), sampling tests intest_decorators.py(8)
- Version bump to 0.3.0 (minor: new modules, zero breaking changes)
__init__.py: exportsThresholdPolicy,extract_meta,register_extractor,meta_log,BinaryAwareRouter,AsyncBufferedSink,RingBufferSinkconfigure.py: acceptsmeta_policyandauto_extract_meta; readsNFO_META_THRESHOLDandNFO_META_EXTRACTenv varsdecorators.py:@log_calland@catchacceptsample_rate(sampling check deferred after function execution for zero overhead on skipped calls)meta_decorators.py:@meta_logacceptssample_rate
feat(docs): docs module improvements
- docs: update README
- update pyproject.toml
feat(docs): code analysis engine
- docs: update README
- docs: update TODO.md
- docs: update README
- docs: update function-reference.md
- docs: update project-analysis.md
- update project.functions.toon
- scripts: update project.sh
- update project.toon-schema.json
feat(docs): comprehensive project analysis with function index
- Project function index (
project.functions.toon) - comprehensive analysis of 46 modules and 448 functions - Project metrics section in README with detailed statistics:
- 46 modules across core, tests, examples, and demo
- 448 total functions with comprehensive metadata tracking
- 114 tests with full coverage of all sinks and decorators
- 7 sink types: SQLite, CSV, Markdown, JSON, Prometheus, Webhook, LLM
- Multi-language support: Python (core), Go, Rust, Bash clients
- DevOps ready: Docker Compose, Kubernetes, gRPC, HTTP services
- Update README with project metrics from function index analysis
- Update version reference from v0.2.3 to v0.2.6
- Function distribution shows strong focus on decorators, sinks, and logging infrastructure
- Test coverage indicates comprehensive validation of all major components
- Multi-language examples demonstrate broad integration capabilities
- Demo applications provide realistic load generation and monitoring scenarios
fix(docs): CLI interface with 3 supporting modules
- docs: update README
- update tests/test_auto.py
- update tests/test_decorators.py
- update pyproject.toml
- update .bumpversion.cfg
- update nfo/init.py
- update nfo/auto.py
- update nfo/decorators.py
- update nfo/llm.py
- update nfo/logged.py
- update nfo/logger.py
- update nfo/models.py
- Oversized log payloads — added bounded serialization for
args,kwargs,return_value, andkwarg_typesviaLogEntry.safe_repr+max_repr_length(default:2048) - Stdlib log flooding —
Logger._format_stdlib()now uses truncatedLogEntryrepr helpers instead of raw!r - LLM prompt bloat —
LLMSinknow builds prompts from truncated argument representations
max_repr_lengthoption for@log_call,@catch,@logged,auto_log(), andauto_log_by_name()- Regression tests for truncation paths in decorators and auto instrumentation
feat(docs): deep code analysis engine with 6 supporting modules
- docs: update README
- update img.png
All notable changes to nfo are documented here.
bump2versionconfig — synced.bumpversion.cfgto trackpyproject.toml,VERSION, andnfo/__init__.py; all three files now bump atomicallyenv_tagger_usage.py— fixedsqlite3.Row.get()→dict(row).get()(Python 3.13 compat)- Stale pip install — resolved nfo 0.1.17 in
site-packagesshadowing local source
nfoCLI — universal command proxy with automatic logging:nfo run -- <cmd>— run any command with nfo logging (args, stdout/stderr, return code, duration, language auto-detection)nfo logs [db] [--errors] [--level] [--last 24h] [--function]— query SQLite logs with color outputnfo serve [--port] [--host]— start centralized HTTP logging service (built-in FastAPI, no external file needed)nfo version— print version- Entry point registered in
pyproject.toml([project.scripts])
nfo/__main__.py—python -m nfosupportnfo serve— inline HTTP logging service withPOST /log,POST /log/batch,GET /logs,GET /health- gRPC server (
examples/grpc_server.py) — high-performance Python gRPC logging service implementingLogCall,BatchLog,StreamLog(bidirectional),QueryLogs - gRPC client (
examples/grpc_client.py) — Python gRPC client demo for all 4 RPCs [grpc]optional dependency —pip install nfo[grpc]installsgrpcio+grpcio-tools- Root
Dockerfile— used byexamples/docker-compose-service.ymlfor centralized logging service - Multi-language examples — verified and tested: Go client, Rust client, Bash client, gRPC proto, Kubernetes manifests, Docker Compose service stack
.env.examplefiles — root +examples/with allNFO_*variables documentedexamples/http_service.py— standalone FastAPI centralized logging service with.envsupportexamples/bash_wrapper.py— nfo-bash proxy for shell scripts → SQLiteexamples/bash_client.sh— zero-dependency Bash HTTP client (nfo_log,nfo_run,nfo_query)examples/env_config_usage.py—.envfile configuration with python-dotenvexamples/async_usage.py,auto_log_usage.py,configure_usage.py,env_tagger_usage.py— new Python examples
PrometheusSink— export function call metrics (duration histogram, call count, error rate) to Prometheus; auto/metricsendpoint; optional deppip install nfo[prometheus]WebhookSink— HTTP POST alerts to Slack, Discord, or Microsoft Teams on ERROR; fire-and-forget with format templates; zero external dependencies (stdliburllib)JSONSink— structured JSON Lines output for ELK/Grafana Loki/Fluentd; zero external dependencies- Docker Compose demo stack —
nfo-demo(FastAPI) + Prometheus + Grafana with pre-built dashboard - Grafana dashboard — auto-provisioned: calls/s, error rate, p95 duration, histogram, top functions
- Load generator —
demo/load_generator.pyfor populating metrics configure()now supportsjson:pathandprometheus:portsink specs- 27 new tests for
PrometheusSink,WebhookSink,JSONSink(114 total) - Optional dependency groups:
[prometheus],[dashboard]
- Version bump to 0.2.0 (minor: new sinks, Docker Compose, DevOps integration)
pyproject.toml: added[prometheus]and[dashboard]optional dependency groups[dev]group now includespytest-asyncioandprometheus_client
- Duplicate log lines — set
propagate=Falseon stdlib logger to prevent double output - Re-configuration guard —
configure()now returns cached logger on repeated calls (useforce=Trueto override)
- Version sync between
__init__.pyandpyproject.toml
__version__in__init__.pysynced withpyproject.toml(was out of date)
- Async support —
@log_call,@catch, and@loggednow transparently handleasync deffunctions viainspect.iscoroutinefunction() - Async tests: 7 new tests for async
@log_calland@catch
auto_log_by_name()— likeauto_log()but accepts module name strings; resolves fromsys.modulesauto_log()— one-call module-level patching: wraps all functions in a module with@log_callor@catchwithout individual decoratorsLogEntrysinks now persistenvironment,trace_id,version,llm_analysisfields- Comparison table with loguru, structlog, stdlib logging in README
- CHANGELOG.md, TODO.md
LLMSink— LLM-powered log analysis via litellm (OpenAI, Anthropic, Ollama)detect_prompt_injection()— regex-based prompt injection detection in function argsEnvTagger— auto-tags logs with environment (prod/dev/ci/k8s/docker), trace_id, versionDynamicRouter— routes logs to different sinks based on env/level/custom rulesDiffTracker— detects output changes between function versions (A/B testing)LogEntryextended withenvironment,trace_id,version,llm_analysisfieldsconfigure()extended withllm_model,environment,version,detect_injectionparamslitellmas optional dependency:pip install nfo[llm]
pyproject.toml: added[llm]and[all]optional dependency groups
configure()— one-liner project-wide logging setup with sink specs and stdlib bridge@logged— class decorator that auto-wraps all public methods with@log_call@skip— exclude specific methods from@logged_StdlibBridge— forwards stdliblogging.getLogger()records to nfo sinksimport nfo.setup— zero-config auto-setup on import- Example scripts:
basic_usage.py,sqlite_sink.py,csv_sink.py,markdown_sink.py,multi_sink.py - Integration modules for pactown (
nfo_config.py) and pactown-com (nfo_config.py)
- Renamed package from
lgtonfo(PyPI:pip install nfo) - Updated all imports, tests, and packaging from
lgtonfo
- Initial release
@log_call— decorator that logs function entry/exit, args, types, return value, exceptions, duration@catch— like@log_callbut suppresses exceptions (returns configurable default)Logger— central dispatcher with multiple sinks + optional stdlib forwardingSQLiteSink— persist logs to SQLite database (queryable)CSVSink— append logs to CSV fileMarkdownSink— write human-readable Markdown log filesLogEntrydataclass with full function call metadata- Thread-safe sinks with locks
- Zero external dependencies (stdlib only for core)