-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.functions.toon
More file actions
809 lines (808 loc) · 69.6 KB
/
project.functions.toon
File metadata and controls
809 lines (808 loc) · 69.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
project: nfo
generated: "2026-02-15T10:43:53.391693"
modules[67]{path,lang,items}:
demo/app.py,python,13
demo/load_generator.py,python,2
tests/test_prometheus.py,python,10
tests/test_auto.py,python,17
tests/test_binary_router.py,python,13
tests/test_env.py,python,23
tests/test_extractors.py,python,42
tests/test_llm.py,python,19
tests/test_buffered_sink.py,python,16
tests/test_ring_buffer_sink.py,python,17
tests/__init__.py,python,0
tests/test_json_sink.py,python,10
tests/test_configure.py,python,24
tests/test_pipeline_sink.py,python,29
tests/test_sinks.py,python,7
tests/test_terminal.py,python,30
tests/test_meta.py,python,20
tests/test_click_integration.py,python,16
tests/test_webhook.py,python,11
tests/test_decorators.py,python,29
tests/test_meta_decorators.py,python,18
tools/sync_pactown_com_dependency.py,python,0
nfo/auto.py,python,3
nfo/llm.py,python,8
nfo/configure.py,python,6
nfo/extractors.py,python,10
nfo/webhook.py,python,5
nfo/buffered_sink.py,python,7
nfo/__init__.py,python,2
nfo/ring_buffer_sink.py,python,6
nfo/setup.py,python,0
nfo/__main__.py,python,9
nfo/meta.py,python,3
nfo/binary_router.py,python,4
nfo/models.py,python,7
nfo/pipeline_sink.py,python,19
nfo/decorators.py,python,14
nfo/terminal.py,python,9
nfo/env.py,python,14
nfo/meta_decorators.py,python,5
nfo/prometheus.py,python,5
nfo/logged.py,python,5
nfo/json_sink.py,python,3
nfo/click.py,python,5
nfo/logger.py,python,6
nfo/sinks.py,python,15
examples/http-service/main.py,python,5
examples/auto-log/main.py,python,5
examples/bash-wrapper/main.py,python,3
examples/sqlite-sink/main.py,python,3
examples/go-client/main.go,go,5
examples/configure/main.py,python,4
examples/rust-client/main.rs,rust,0
examples/basic-usage/main.py,python,3
examples/markdown-sink/main.py,python,3
examples/csv-sink/main.py,python,3
examples/grpc-service/server.py,python,6
examples/grpc-service/client.py,python,1
examples/grpc-service/nfo_pb2_grpc.py,python,10
examples/grpc-service/nfo_pb2.py,python,0
examples/multi-sink/main.py,python,4
examples/env-tagger/main.py,python,3
examples/env-config/main.py,python,4
examples/click-integration/demo_basic.py,python,5
examples/click-integration/demo_configure.py,python,3
examples/click-integration/demo_formats.py,python,2
examples/async-usage/main.py,python,5
function_details:
demo/app.py:
functions[13]{name,kind,sig,loc,async,lines,cc,does}:
compute_fibonacci,function,"(n:int) -> int",99-106,false,8,3,Compute fibonacci number (intentionally slow for large n).
process_order,function,"(order_id:str, amount:float) -> dict",110-113,false,4,1,Simulate order processing.
risky_division,function,"(a:float, b:float) -> float",117-119,false,3,1,Division that may fail.
slow_operation,function,"(duration:float) -> str",123-126,false,4,1,Simulate a slow operation.
health,function,(),151-152,false,2,1,health
demo_success,function,(),156-165,false,10,1,Run several successful decorated function calls.
demo_error,function,(),169-179,false,11,2,Trigger error-level log entries.
demo_slow,function,(),183-187,false,5,1,Trigger a slow operation to demonstrate duration histograms.
demo_batch,function,(),191-213,false,23,6,Run a batch of mixed calls (success + errors) for load simulation.
metrics,function,(),217-222,false,6,1,Expose Prometheus metrics (alternative to prom_sink auto-server).
browse_logs,function,"(level:str='', limit:int=50)",226-244,false,19,3,Browse latest logs from SQLite.
UserService.create_user,method,"(name:str, email:str) -> dict",131-133,false,3,1,creates user
UserService.delete_user,method,"(user_id:int) -> bool",135-138,false,4,2,deletes user
demo/load_generator.py:
functions[2]{name,kind,sig,loc,async,lines,cc,does}:
weighted_choice,function,(endpoints),24-32,false,9,4,weighted choice
main,function,(),35-59,false,25,5,main
tests/test_prometheus.py:
functions[10]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,(),13-28,false,16,1,creates entry
TestPrometheusSink.test_increments_call_counter,method,(),33-38,false,6,1,checks increments call counter
TestPrometheusSink.test_increments_error_counter,method,(),40-44,false,5,1,checks increments error counter
TestPrometheusSink.test_records_duration_histogram,method,(),46-50,false,5,1,checks records duration histogram
TestPrometheusSink.test_no_duration_when_none,method,(),52-58,false,7,1,checks no duration when none
TestPrometheusSink.test_delegates_to_downstream,method,(),60-73,false,14,1,checks delegates to downstream
TestPrometheusSink.test_close_delegates,method,(),75-86,false,12,1,checks close delegates
TestPrometheusSink.test_custom_prefix,method,(),88-93,false,6,1,checks custom prefix
TestPrometheusSink.test_multiple_functions,method,(),95-102,false,8,1,checks multiple functions
TestPrometheusSink.test_get_metrics_returns_bytes,method,(),104-109,false,6,1,checks get metrics returns bytes
tests/test_auto.py:
functions[17]{name,kind,sig,loc,async,lines,cc,does}:
_make_module,function,"(name:str='test_mod') -> types.ModuleType",25-34,false,10,2,Create a fake module with given functions.
MemorySink.__init__,method,(),15-16,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",18-19,false,2,1,logs
MemorySink.close,method,() -> None,21-22,false,2,1,stops
TestAutoLog.test_patches_public_functions,method,(),39-59,false,21,1,checks patches public functions
TestAutoLog.test_skips_private_functions,method,(),61-78,false,18,1,checks skips private functions
TestAutoLog.test_include_private,method,(),80-94,false,15,1,checks include private
TestAutoLog.test_catch_exceptions_mode,method,(),96-112,false,17,1,checks catch exceptions mode
TestAutoLog.test_does_not_double_wrap,method,(),114-130,false,17,1,checks does not double wrap
TestAutoLog.test_skips_imported_functions,method,(),132-148,false,17,1,Functions from other modules should not be patched.
TestAutoLog.test_skips_nfo_skip_decorated,method,(),150-165,false,16,1,checks skips nfo skip decorated
TestAutoLog.test_custom_level,method,(),167-179,false,13,1,checks custom level
TestAutoLog.test_skips_classes,method,(),181-199,false,19,1,Classes should not be patched (use @logged for those).
TestAutoLog.test_max_repr_length_is_forwarded,method,(),201-216,false,16,1,checks max repr length is forwarded
TestAutoLogByName.test_patches_by_module_name,method,(),221-243,false,23,1,checks patches by module name
TestAutoLogByName.test_skips_missing_modules,method,(),245-249,false,5,1,checks skips missing modules
TestAutoLogByName.test_multiple_modules_by_name,method,(),251-279,false,29,1,checks multiple modules by name
tests/test_binary_router.py:
functions[13]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,() -> LogEntry,22-37,false,16,1,creates entry
MemorySink.__init__,method,(),11-13,false,3,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",15-16,false,2,1,logs
MemorySink.close,method,() -> None,18-19,false,2,1,stops
TestBinaryAwareRouter.test_meta_log_routes_to_lightweight,method,(),42-51,false,10,1,checks meta log routes to lightweight
TestBinaryAwareRouter.test_normal_entry_routes_to_full,method,(),53-62,false,10,1,checks normal entry routes to full
TestBinaryAwareRouter.test_large_data_routes_to_heavy,method,(),64-80,false,17,1,checks large data routes to heavy
TestBinaryAwareRouter.test_large_data_no_heavy_sink_falls_to_full,method,(),82-95,false,14,1,checks large data no heavy sink falls to full
TestBinaryAwareRouter.test_large_return_value_routes_to_heavy,method,(),97-111,false,15,1,checks large return value routes to heavy
TestBinaryAwareRouter.test_close_closes_all_sinks,method,(),113-126,false,14,1,checks close closes all sinks
TestBinaryAwareRouter.test_close_without_heavy,method,(),128-135,false,8,1,checks close without heavy
TestBinaryAwareRouter.test_mixed_entries_routed_correctly,method,(),137-159,false,23,1,checks mixed entries routed correctly
TestBinaryAwareRouter.test_small_binary_not_routed_to_heavy,method,(),161-176,false,16,1,checks small binary not routed to heavy
tests/test_env.py:
functions[23]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,() -> LogEntry,27-42,false,16,1,creates entry
MemorySink.__init__,method,(),17-18,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",20-21,false,2,1,logs
MemorySink.close,method,() -> None,23-24,false,2,1,stops
TestEnvTagger.test_tags_environment,method,(),49-54,false,6,1,checks tags environment
TestEnvTagger.test_tags_trace_id,method,(),56-61,false,6,1,checks tags trace id
TestEnvTagger.test_tags_version,method,(),63-68,false,6,1,checks tags version
TestEnvTagger.test_auto_detect_env,method,(monkeypatch),70-74,false,5,1,checks auto detect env
TestEnvTagger.test_auto_detect_ci,method,(monkeypatch),76-89,false,14,1,checks auto detect ci
TestEnvTagger.test_does_not_overwrite_existing,method,(),91-96,false,6,1,checks does not overwrite existing
TestEnvTagger.test_close_delegates,method,(),98-101,false,4,1,checks close delegates
TestEnvTagger.test_generate_trace_id,method,(),103-106,false,4,1,checks generate trace id
TestDynamicRouter.test_routes_by_env,method,(),113-127,false,15,1,checks routes by env
TestDynamicRouter.test_routes_by_level,method,(),129-141,false,13,1,checks routes by level
TestDynamicRouter.test_default_fallback,method,(),143-147,false,5,1,checks default fallback
TestDynamicRouter.test_no_default_no_match,method,(),149-151,false,3,1,checks no default no match
TestDynamicRouter.test_first_match_wins,method,(),153-164,false,12,1,checks first match wins
TestDynamicRouter.test_close_all_sinks,method,(),166-174,false,9,1,checks close all sinks
TestDiffTracker.test_no_diff_same_version,method,(),181-188,false,8,1,checks no diff same version
TestDiffTracker.test_detects_diff_across_versions,method,(),190-199,false,10,1,checks detects diff across versions
TestDiffTracker.test_no_diff_without_version,method,(),201-208,false,8,1,checks no diff without version
TestDiffTracker.test_different_functions_no_diff,method,(),210-217,false,8,1,checks different functions no diff
TestDiffTracker.test_close_delegates,method,(),219-222,false,4,1,checks close delegates
tests/test_extractors.py:
functions[42]{name,kind,sig,loc,async,lines,cc,does}:
_make_png,function,"(width:int=100, height:int=200) -> bytes",27-34,false,8,1,Build minimal PNG header (first 24 bytes).
_make_jpeg,function,"(width:int=640, height:int=480) -> bytes",37-47,false,11,1,Build minimal JPEG with SOF0 marker.
_make_bmp,function,"(width:int=320, height:int=240) -> bytes",50-55,false,6,1,Build minimal BMP header.
_make_wav,function,"(channels:int=2, sample_rate:int=44100, bits:int=16, data_size:int=88200) -> bytes",58-73,false,16,1,Build minimal WAV header (44 bytes RIFF/WAVE).
TestDetectFormat.test_png,method,(),82-83,false,2,1,checks png
TestDetectFormat.test_jpeg,method,(),85-86,false,2,1,checks jpeg
TestDetectFormat.test_bmp,method,(),88-89,false,2,1,checks bmp
TestDetectFormat.test_gzip,method,(),91-92,false,2,1,checks gzip
TestDetectFormat.test_pdf,method,(),94-95,false,2,1,checks pdf
TestDetectFormat.test_unknown,method,(),97-98,false,2,1,checks unknown
TestDetectFormat.test_empty,method,(),100-101,false,2,1,checks empty
TestDetectFormat.test_wav,method,(),103-104,false,2,1,checks wav
TestExtractImageMeta.test_png_dimensions,method,(),113-120,false,8,1,checks png dimensions
TestExtractImageMeta.test_jpeg_dimensions,method,(),122-126,false,5,1,checks jpeg dimensions
TestExtractImageMeta.test_bmp_dimensions,method,(),128-132,false,5,1,checks bmp dimensions
TestExtractImageMeta.test_size_bytes,method,(),134-137,false,4,1,checks size bytes
TestExtractBinaryMeta.test_basic_fields,method,(),146-152,false,7,1,checks basic fields
TestExtractBinaryMeta.test_high_entropy_detection,method,(),154-160,false,7,1,checks high entropy detection
TestExtractBinaryMeta.test_low_entropy,method,(),162-166,false,5,1,checks low entropy
TestExtractBinaryMeta.test_empty_bytes,method,(),168-171,false,4,1,checks empty bytes
TestExtractBinaryMeta.test_known_format_detection,method,(),173-176,false,4,1,checks known format detection
TestExtractFileMeta.test_bytesio,method,(),185-193,false,9,1,checks bytesio
TestExtractFileMeta.test_stringio,method,(),195-199,false,5,1,checks stringio
TestExtractFileMeta.test_real_file,method,(tmp_path),201-209,false,9,1,checks real file
TestExtractWavMeta.test_stereo_44100,method,(),218-226,false,9,1,checks stereo 44100
TestExtractWavMeta.test_mono_16000,method,(),228-233,false,6,1,checks mono 16000
TestExtractNumpyMeta.test_duck_typed_ndarray,method,(),242-258,false,17,1,checks duck typed ndarray
TestExtractMeta.test_png_auto_detected,method,(),267-270,false,4,1,checks png auto detected
TestExtractMeta.test_wav_auto_detected,method,(),272-275,false,4,1,checks wav auto detected
TestExtractMeta.test_generic_bytes,method,(),277-279,false,3,1,checks generic bytes
TestExtractMeta.test_memoryview,method,(),281-283,false,3,1,checks memoryview
TestExtractMeta.test_file_like,method,(),285-287,false,3,1,checks file like
TestExtractMeta.test_int_returns_none,method,(),289-290,false,2,1,checks int returns none
TestExtractMeta.test_string_returns_none,method,(),292-293,false,2,1,checks string returns none
TestExtractMeta.test_list_returns_none,method,(),295-296,false,2,1,checks list returns none
TestExtractMeta.test_none_returns_none,method,(),298-299,false,2,1,checks none returns none
TestCustomExtractors.setup_method,method,(),308-309,false,2,1,initializes method
TestCustomExtractors.teardown_method,method,(),311-312,false,2,1,teardown method
TestCustomExtractors.test_register_and_use,method,(),314-329,false,16,1,checks register and use
TestCustomExtractors.test_custom_takes_priority,method,(),331-339,false,9,1,checks custom takes priority
TestCustomExtractors.test_failing_check_is_skipped,method,(),341-348,false,8,1,checks failing check is skipped
TestCustomExtractors.test_unregister_all,method,(),350-357,false,8,1,checks unregister all
tests/test_llm.py:
functions[19]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,() -> LogEntry,26-42,false,17,1,creates entry
MemorySink.__init__,method,(),16-17,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",19-20,false,2,1,logs
MemorySink.close,method,() -> None,22-23,false,2,1,stops
TestPromptInjection.test_detects_ignore_instructions,method,(),49-52,false,4,1,checks detects ignore instructions
TestPromptInjection.test_detects_system_prompt,method,(),54-56,false,3,1,checks detects system prompt
TestPromptInjection.test_detects_jailbreak,method,(),58-60,false,3,1,checks detects jailbreak
TestPromptInjection.test_detects_dan_mode,method,(),62-64,false,3,1,checks detects dan mode
TestPromptInjection.test_detects_reveal_prompt,method,(),66-68,false,3,1,checks detects reveal prompt
TestPromptInjection.test_clean_text_passes,method,(),70-73,false,4,1,checks clean text passes
TestPromptInjection.test_scan_entry_args,method,(),75-79,false,5,1,checks scan entry args
TestPromptInjection.test_scan_entry_kwargs,method,(),81-84,false,4,1,checks scan entry kwargs
TestPromptInjection.test_scan_entry_clean,method,(),86-89,false,4,1,checks scan entry clean
TestPromptInjection.test_scan_entry_extra_message,method,(),91-94,false,4,1,checks scan entry extra message
TestLLMSink.test_delegates_to_sink,method,(),101-111,false,11,1,checks delegates to sink
TestLLMSink.test_injection_detection_on_write,method,(),113-129,false,17,1,checks injection detection on write
TestLLMSink.test_analyze_levels_filter,method,(),131-145,false,15,1,checks analyze levels filter
TestLLMSink.test_build_user_prompt,method,(),147-154,false,8,1,checks build user prompt
TestLLMSink.test_close_delegates,method,(),156-160,false,5,1,checks close delegates
tests/test_buffered_sink.py:
functions[16]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,() -> LogEntry,32-47,false,16,1,creates entry
MemorySink.__init__,method,(),14-17,false,4,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",19-21,false,3,1,logs
MemorySink.close,method,() -> None,23-24,false,2,1,stops
MemorySink.count,method,() -> int,27-29,false,3,1,count
TestAsyncBufferedSink.test_flush_on_buffer_full,method,(),52-63,false,12,1,checks flush on buffer full
TestAsyncBufferedSink.test_flush_on_interval,method,(),65-74,false,10,1,checks flush on interval
TestAsyncBufferedSink.test_flush_on_error_entry,method,(),76-85,false,10,1,checks flush on error entry
TestAsyncBufferedSink.test_no_flush_on_error_when_disabled,method,(),87-95,false,9,1,checks no flush on error when disabled
TestAsyncBufferedSink.test_close_flushes_remaining,method,(),97-104,false,8,1,checks close flushes remaining
TestAsyncBufferedSink.test_manual_flush,method,(),106-116,false,11,1,checks manual flush
TestAsyncBufferedSink.test_pending_count,method,(),118-130,false,13,1,checks pending count
TestAsyncBufferedSink.test_write_after_close_ignored,method,(),132-137,false,6,1,checks write after close ignored
TestAsyncBufferedSink.test_idempotent_close,method,(),139-145,false,7,1,checks idempotent close
TestAsyncBufferedSink.test_delegate_write_exception_does_not_crash,method,(),147-157,false,11,1,checks delegate write exception does not crash
TestAsyncBufferedSink.test_critical_entry_also_flushes,method,(),159-167,false,9,1,checks critical entry also flushes
tests/test_ring_buffer_sink.py:
functions[17]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,() -> LogEntry,22-37,false,16,1,creates entry
MemorySink.__init__,method,(),11-13,false,3,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",15-16,false,2,1,logs
MemorySink.close,method,() -> None,18-19,false,2,1,stops
TestRingBufferSink.test_normal_entries_buffered_not_written,method,(),42-49,false,8,1,checks normal entries buffered not written
TestRingBufferSink.test_error_flushes_context_plus_error,method,(),51-63,false,13,1,checks error flushes context plus error
TestRingBufferSink.test_critical_also_flushes,method,(),65-71,false,7,1,checks critical also flushes
TestRingBufferSink.test_custom_trigger_levels,method,(),73-80,false,8,1,checks custom trigger levels
TestRingBufferSink.test_error_does_not_trigger_with_custom_levels,method,(),82-88,false,7,1,checks error does not trigger with custom levels
TestRingBufferSink.test_capacity_evicts_oldest,method,(),90-102,false,13,1,checks capacity evicts oldest
TestRingBufferSink.test_include_trigger_false,method,(),104-111,false,8,1,checks include trigger false
TestRingBufferSink.test_buffer_cleared_after_flush,method,(),113-122,false,10,1,checks buffer cleared after flush
TestRingBufferSink.test_multiple_errors,method,(),124-132,false,9,1,checks multiple errors
TestRingBufferSink.test_close_clears_buffer_and_closes_delegate,method,(),134-140,false,7,1,checks close clears buffer and closes delegate
TestRingBufferSink.test_capacity_property,method,(),142-145,false,4,1,checks capacity property
TestRingBufferSink.test_empty_buffer_error_only_writes_error,method,(),147-152,false,6,1,checks empty buffer error only writes error
TestRingBufferSink.test_case_insensitive_trigger,method,(),154-159,false,6,1,checks case insensitive trigger
tests/test_json_sink.py:
functions[10]{name,kind,sig,loc,async,lines,cc,does}:
tmp_jsonl,function,(tmp_path),14-15,false,2,1,tmp jsonl
_make_entry,function,(),18-33,false,16,1,creates entry
TestJSONSink.test_write_creates_file,method,(tmp_jsonl),38-41,false,4,1,checks write creates file
TestJSONSink.test_write_valid_json_lines,method,(tmp_jsonl),43-55,false,13,1,checks write valid json lines
TestJSONSink.test_includes_all_fields,method,(tmp_jsonl),57-71,false,15,1,checks includes all fields
TestJSONSink.test_includes_extra_fields,method,(tmp_jsonl),73-80,false,8,1,checks includes extra fields
TestJSONSink.test_pretty_mode,method,(tmp_jsonl),82-89,false,8,1,checks pretty mode
TestJSONSink.test_delegates_to_downstream,method,(tmp_jsonl),91-105,false,15,1,checks delegates to downstream
TestJSONSink.test_close_delegates,method,(tmp_jsonl),107-118,false,12,1,checks close delegates
TestJSONSink.test_error_entry,method,(tmp_jsonl),120-134,false,15,1,checks error entry
tests/test_configure.py:
functions[24]{name,kind,sig,loc,async,lines,cc,does}:
MemorySink.__init__,method,(),17-18,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",20-21,false,2,1,logs
MemorySink.close,method,() -> None,23-24,false,2,1,stops
TestParseSinkSpec.test_sqlite,method,(tmp_path),31-34,false,4,1,checks sqlite
TestParseSinkSpec.test_csv,method,(tmp_path),36-38,false,3,1,checks csv
TestParseSinkSpec.test_md,method,(tmp_path),40-42,false,3,1,checks md
TestParseSinkSpec.test_invalid_no_colon,method,(),44-46,false,3,1,checks invalid no colon
TestParseSinkSpec.test_unknown_type,method,(),48-50,false,3,1,checks unknown type
TestConfigure.setup_method,method,(),57-60,false,4,1,initializes method
TestConfigure.test_returns_logger,method,(),62-65,false,4,1,checks returns logger
TestConfigure.test_with_sink_specs,method,(tmp_path),67-76,false,10,1,checks with sink specs
TestConfigure.test_with_sink_instances,method,(),78-86,false,9,1,checks with sink instances
TestConfigure.test_env_override_level,method,(monkeypatch),88-92,false,5,1,checks env override level
TestConfigure.test_env_override_sinks,method,"(tmp_path, monkeypatch)",94-100,false,7,1,checks env override sinks
TestConfigure.test_decorators_use_configured_logger,method,(),102-112,false,11,1,checks decorators use configured logger
TestLogged.test_wraps_public_methods,method,(),119-141,false,23,1,checks wraps public methods
TestLogged.test_skip_decorator,method,(),143-162,false,20,1,checks skip decorator
TestLogged.test_logged_with_level,method,(),164-176,false,13,1,checks logged with level
TestLogged.test_logged_preserves_exceptions,method,(),178-193,false,16,1,checks logged preserves exceptions
TestStdlibBridge.test_bridge_captures_stdlib_logs,method,(),200-222,false,23,1,checks bridge captures stdlib logs
TestStdlibBridge.test_bridge_qualified_function_name,method,(),224-244,false,21,1,checks bridge qualified function name
TestStdlibBridge.test_bridge_multiple_loggers,method,(),246-275,false,30,3,checks bridge multiple loggers
TestStdlibBridge.test_bridge_no_duplicate_from_child_propagation,method,(),277-306,false,30,3,"When both parent and child loggers are in the bridge list,"
TestStdlibBridge.test_bridge_exception_info,method,(),308-329,false,22,2,checks bridge exception info
tests/test_pipeline_sink.py:
functions[29]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,"(function_name='test_fn', level='INFO', duration_ms=None, exception=None, exception_type=None, extra=None)",29-50,false,22,2,creates entry
_step_entry,function,"(run_id, step_name, duration_ms=10.0)",53-65,false,13,1,Create a pipeline step entry.
_completion_entry,function,"(run_id, total_ms=100.0, total_cost=0.0, total_steps=3)",68-79,false,12,1,Create a pipeline completion marker entry.
MemorySink.__init__,method,(),19-20,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry)",22-23,false,2,1,logs
MemorySink.close,method,(),25-26,false,2,1,stops
TestPipelineSinkBasic.test_non_pipeline_entry_passes_through,method,(),88-94,false,7,1,checks non pipeline entry passes through
TestPipelineSinkBasic.test_non_pipeline_entry_no_delegate,method,(),96-100,false,5,1,checks non pipeline entry no delegate
TestPipelineSinkBasic.test_pipeline_entry_buffered_until_complete,method,(),102-107,false,6,1,checks pipeline entry buffered until complete
TestPipelineSinkBasic.test_complete_marker_flushes_run,method,(),109-122,false,14,1,checks complete marker flushes run
TestPipelineSinkBasic.test_tick_counter_increments,method,(),124-134,false,11,1,checks tick counter increments
TestPipelineSinkRendering.test_box_drawing_chars_present,method,(),139-151,false,13,1,checks box drawing chars present
TestPipelineSinkRendering.test_step_with_error_shows_fail_icon,method,(),153-170,false,18,1,checks step with error shows fail icon
TestPipelineSinkRendering.test_skipped_step_shows_skip_icon,method,(),172-182,false,11,2,checks skipped step shows skip icon
TestPipelineSinkRendering.test_step_metrics_displayed,method,(),184-194,false,11,1,checks step metrics displayed
TestPipelineSinkRendering.test_cost_in_footer,method,(),196-202,false,7,1,checks cost in footer
TestPipelineSinkRendering.test_duration_in_footer,method,(),204-210,false,7,1,checks duration in footer
TestPipelineSinkRendering.test_decision_sub_line,method,(),212-224,false,13,1,checks decision sub line
TestPipelineSinkRendering.test_tokens_sub_line,method,(),226-236,false,11,1,checks tokens sub line
TestPipelineSinkRendering.test_ocr_sub_line,method,(),238-249,false,12,1,checks ocr sub line
TestPipelineSinkColor.test_color_enabled_has_ansi,method,(),254-260,false,7,1,checks color enabled has ansi
TestPipelineSinkColor.test_color_disabled_no_ansi,method,(),262-268,false,7,1,checks color disabled no ansi
TestPipelineSinkTimeout.test_stale_buffer_flushed,method,(),273-282,false,10,1,checks stale buffer flushed
TestPipelineSinkTimeout.test_close_flushes_all,method,(),284-293,false,10,1,checks close flushes all
TestPipelineSinkMultipleRuns.test_independent_runs,method,(),298-315,false,18,1,checks independent runs
TestPipelineSinkFooter.test_error_count_in_footer,method,(),320-334,false,15,1,checks error count in footer
TestPipelineSinkFooter.test_steps_count_in_footer,method,(),336-344,false,9,1,checks steps count in footer
TestPipelineSinkDelegate.test_close_calls_delegate_close,method,(),349-353,false,5,1,checks close calls delegate close
TestPipelineSinkDelegate.test_delegate_receives_non_pipeline_entries,method,(),355-367,false,13,1,checks delegate receives non pipeline entries
tests/test_sinks.py:
functions[7]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,() -> LogEntry,14-29,false,16,1,creates entry
TestSQLiteSink.test_write_and_query,method,(tmp_path),36-47,false,12,1,checks write and query
TestSQLiteSink.test_custom_table,method,(tmp_path),49-59,false,11,1,checks custom table
TestCSVSink.test_write_rows,method,(tmp_path),66-77,false,12,1,checks write rows
TestCSVSink.test_does_not_duplicate_header,method,(tmp_path),79-93,false,15,3,checks does not duplicate header
TestMarkdownSink.test_write_entry,method,(tmp_path),100-109,false,10,1,checks write entry
TestMarkdownSink.test_exception_block,method,(tmp_path),111-123,false,13,1,checks exception block
tests/test_terminal.py:
functions[30]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,"(level='DEBUG', function_name='add', args=(3, 7), kwargs=None, return_value=10, duration_ms=1.5, exception=None, exception_type=None)",12-39,false,28,4,creates entry
TestAsciiFormat.test_basic_output,method,(),48-57,false,10,1,checks basic output
TestAsciiFormat.test_exception_output,method,(),59-69,false,11,1,checks exception output
TestAsciiFormat.test_no_args,method,(),71-76,false,6,1,checks no args
TestAsciiFormat.test_no_return,method,(),78-83,false,6,1,checks no return
TestAsciiFormat.test_no_duration,method,(),85-90,false,6,1,checks no duration
TestColorFormat.test_basic_output,method,(),99-105,false,7,1,checks basic output
TestColorFormat.test_slow_duration_highlighted,method,(),107-112,false,6,1,checks slow duration highlighted
TestColorFormat.test_medium_duration,method,(),114-119,false,6,1,checks medium duration
TestColorFormat.test_traceback_shown,method,(),121-132,false,12,1,checks traceback shown
TestColorFormat.test_exception_color,method,(),134-144,false,11,1,checks exception color
TestMarkdownFormat.test_basic_output,method,(),153-159,false,7,1,checks basic output
TestMarkdownFormat.test_error_output,method,(),161-172,false,12,1,checks error output
TestMarkdownFormat.test_shows_kwargs,method,(),174-179,false,6,2,checks shows kwargs
TestMarkdownFormat.test_duration_shown,method,(),181-186,false,6,1,checks duration shown
TestMarkdownFormat.test_meta_shown,method,(),188-193,false,6,1,checks meta shown
TestToonFormat.test_basic_output,method,(),202-211,false,10,1,checks basic output
TestToonFormat.test_exception_output,method,(),213-223,false,11,1,checks exception output
TestToonFormat.test_slow_duration,method,(),225-230,false,6,1,checks slow duration
TestToonFormat.test_kwargs_shown,method,(),232-237,false,6,1,checks kwargs shown
TestToonFormat.test_binary_meta,method,(),239-251,false,13,1,checks binary meta
TestTableFormat.test_basic_output,method,(),260-266,false,7,1,checks basic output
TestTableFormat.test_exception_in_table,method,(),268-278,false,11,1,checks exception in table
TestSinkProperties.test_format_property,method,(),287-289,false,3,1,checks format property
TestSinkProperties.test_unknown_format_falls_back_to_ascii,method,(),291-296,false,6,1,checks unknown format falls back to ascii
TestSinkProperties.test_delegate_receives_entry,method,(),298-305,false,8,1,checks delegate receives entry
TestSinkProperties.test_close_closes_delegate,method,(),307-318,false,12,1,checks close closes delegate
TestSinkProperties.test_close_without_delegate,method,(),320-322,false,3,1,checks close without delegate
TestSinkProperties.test_none_duration,method,(),324-329,false,6,1,checks none duration
TestSinkProperties.test_none_return_value,method,(),331-336,false,6,1,checks none return value
tests/test_meta.py:
functions[20]{name,kind,sig,loc,async,lines,cc,does}:
TestThresholdPolicy.test_default_thresholds,method,(),13-17,false,5,1,checks default thresholds
TestThresholdPolicy.test_small_bytes_below_threshold,method,(),19-21,false,3,1,checks small bytes below threshold
TestThresholdPolicy.test_large_bytes_above_threshold,method,(),23-25,false,3,1,checks large bytes above threshold
TestThresholdPolicy.test_small_bytearray_below_threshold,method,(),27-29,false,3,1,checks small bytearray below threshold
TestThresholdPolicy.test_large_bytearray_above_threshold,method,(),31-33,false,3,1,checks large bytearray above threshold
TestThresholdPolicy.test_memoryview_above_threshold,method,(),35-38,false,4,1,checks memoryview above threshold
TestThresholdPolicy.test_memoryview_below_threshold,method,(),40-43,false,4,1,checks memoryview below threshold
TestThresholdPolicy.test_small_string_below_threshold,method,(),45-47,false,3,1,checks small string below threshold
TestThresholdPolicy.test_large_string_above_threshold,method,(),49-51,false,3,1,checks large string above threshold
TestThresholdPolicy.test_file_like_always_extracts,method,(),53-56,false,4,1,checks file like always extracts
TestThresholdPolicy.test_int_never_extracts,method,(),58-60,false,3,1,checks int never extracts
TestThresholdPolicy.test_list_never_extracts,method,(),62-64,false,3,1,checks list never extracts
TestThresholdPolicy.test_none_never_extracts,method,(),66-68,false,3,1,checks none never extracts
TestThresholdPolicy.test_should_extract_return_meta_uses_return_threshold,method,(),70-76,false,7,1,checks should extract return meta uses return threshold
TestThresholdPolicy.test_custom_thresholds,method,(),78-81,false,4,1,checks custom thresholds
TestSizeof.test_bytes,method,(),86-87,false,2,1,checks bytes
TestSizeof.test_bytearray,method,(),89-90,false,2,1,checks bytearray
TestSizeof.test_memoryview,method,(),92-93,false,2,1,checks memoryview
TestSizeof.test_int,method,(),95-97,false,3,1,checks int
TestSizeof.test_fallback_negative,method,(),99-103,false,5,1,checks fallback negative
tests/test_click_integration.py:
functions[16]{name,kind,sig,loc,async,lines,cc,does}:
TestNfoGroup.test_group_logs_command,method,(),21-47,false,27,1,NfoGroup should emit a log entry when a command completes.
TestNfoGroup.test_group_logs_error,method,(),49-74,false,26,3,NfoGroup should log ERROR when a command raises.
TestNfoGroup.test_group_duration_recorded,method,(),76-99,false,24,1,Duration should be recorded in the log entry.
TestNfoGroup.test_group_filters_nfo_params,method,(),101-126,false,26,3,nfo_* params should not appear in logged kwargs.
TestNfoCommand.test_command_logs_invocation,method,(),135-157,false,23,1,NfoCommand should log its own invocation.
TestNfoCommand.test_command_logs_error,method,(),159-183,false,25,3,NfoCommand should log ERROR on exception.
TestNfoOptions.test_adds_three_options,method,(),192-207,false,16,1,"nfo_options should add --nfo-sink, --nfo-format, --nfo-level."
TestNfoOptions.test_defaults,method,(),209-220,false,12,1,"Defaults: empty sink, color format, DEBUG level."
TestNfoOptions.test_format_choices,method,(),222-232,false,11,1,Invalid format should be rejected.
TestNfoOptions.test_level_choices,method,(),234-244,false,11,1,Invalid level should be rejected.
TestConfigureTerminalSpec.test_parse_terminal_color,method,(),253-257,false,5,1,checks parse terminal color
TestConfigureTerminalSpec.test_parse_terminal_markdown,method,(),259-263,false,5,1,checks parse terminal markdown
TestConfigureTerminalSpec.test_parse_terminal_toon,method,(),265-269,false,5,1,checks parse terminal toon
TestConfigureTerminalSpec.test_parse_terminal_table,method,(),271-275,false,5,1,checks parse terminal table
TestConfigureTerminalSpec.test_parse_terminal_ascii,method,(),277-281,false,5,1,checks parse terminal ascii
TestConfigureTerminalSpec.test_parse_terminal_unknown_defaults_to_color,method,(),283-287,false,5,1,checks parse terminal unknown defaults to color
tests/test_webhook.py:
functions[11]{name,kind,sig,loc,async,lines,cc,does}:
_make_entry,function,(),14-32,false,19,1,creates entry
TestWebhookSink.test_only_sends_configured_levels,method,(),37-44,false,8,1,"Should not send for DEBUG when levels=['ERROR']."
TestWebhookSink.test_sends_for_error_level,method,(),46-52,false,7,1,Should send for ERROR level.
TestWebhookSink.test_slack_payload_format,method,(),54-60,false,7,1,checks slack payload format
TestWebhookSink.test_discord_payload_format,method,(),62-67,false,6,1,checks discord payload format
TestWebhookSink.test_teams_payload_format,method,(),69-74,false,6,1,checks teams payload format
TestWebhookSink.test_raw_payload_format,method,(),76-81,false,6,1,checks raw payload format
TestWebhookSink.test_delegates_to_downstream,method,(),83-95,false,13,1,checks delegates to downstream
TestWebhookSink.test_close_delegates,method,(),97-108,false,12,1,checks close delegates
TestWebhookSink.test_custom_levels,method,(),110-115,false,6,1,checks custom levels
TestWebhookSink.test_fire_and_forget_no_crash,method,(),117-122,false,6,1,Should not crash even if URL is unreachable.
tests/test_decorators.py:
functions[29]{name,kind,sig,loc,async,lines,cc,does}:
logger,function,(),25-30,false,6,1,logger
MemorySink.__init__,method,(),14-15,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",17-18,false,2,1,logs
MemorySink.close,method,() -> None,20-21,false,2,1,stops
TestLogCall.test_logs_args_and_return,method,(logger),37-53,false,17,1,checks logs args and return
TestLogCall.test_logs_kwargs,method,(logger),55-65,false,11,1,checks logs kwargs
TestLogCall.test_logs_exception,method,(logger),67-82,false,16,1,checks logs exception
TestLogCall.test_custom_level,method,(logger),84-92,false,9,1,checks custom level
TestLogCall.test_arg_types,method,(logger),94-103,false,10,1,checks arg types
TestLogCall.test_max_repr_length_truncates_serialized_values,method,(logger),105-123,false,19,1,checks max repr length truncates serialized values
TestCatch.test_suppresses_exception,method,(logger),130-140,false,11,1,checks suppresses exception
TestCatch.test_returns_default,method,(logger),142-149,false,8,1,checks returns default
TestCatch.test_success_path,method,(logger),151-159,false,9,1,checks success path
TestCatch.test_max_repr_length_truncates_error_args,method,(logger),161-172,false,12,1,checks max repr length truncates error args
TestAsyncLogCall.test_logs_async_return,method,(logger),180-192,true,13,1,checks logs async return
TestAsyncLogCall.test_logs_async_exception,method,(logger),195-207,true,13,1,checks logs async exception
TestAsyncLogCall.test_async_custom_level,method,(logger),210-218,true,9,1,checks async custom level
TestAsyncLogCall.test_async_preserves_coroutine,method,(logger),221-229,true,9,1,checks async preserves coroutine
TestAsyncCatch.test_async_suppresses_exception,method,(logger),235-244,true,10,1,checks async suppresses exception
TestAsyncCatch.test_async_returns_default,method,(logger),247-254,true,8,1,checks async returns default
TestAsyncCatch.test_async_success_path,method,(logger),257-265,true,9,1,checks async success path
TestSampling.test_sample_rate_none_logs_everything,method,(logger),272-281,false,10,2,checks sample rate none logs everything
TestSampling.test_sample_rate_one_logs_everything,method,(logger),283-292,false,10,2,checks sample rate one logs everything
TestSampling.test_sample_rate_zero_logs_nothing,method,(logger),294-303,false,10,2,checks sample rate zero logs nothing
TestSampling.test_sample_rate_zero_still_logs_errors,method,(logger),305-316,false,12,3,checks sample rate zero still logs errors
TestSampling.test_sample_rate_partial,method,(logger),318-331,false,14,2,"With sample_rate=0.5, roughly half should be logged (statistical)."
TestSampling.test_sample_rate_return_value_preserved,method,(logger),333-340,false,8,1,checks sample rate return value preserved
TestSampling.test_catch_sample_rate_zero_logs_nothing_on_success,method,(logger),342-350,false,9,1,checks catch sample rate zero logs nothing on success
TestSampling.test_catch_sample_rate_zero_still_logs_errors,method,(logger),352-361,false,10,1,checks catch sample rate zero still logs errors
tests/test_meta_decorators.py:
functions[18]{name,kind,sig,loc,async,lines,cc,does}:
logger,function,(),25-30,false,6,1,logger
MemorySink.__init__,method,(),14-15,false,2,1,creates
MemorySink.write,method,"(entry:LogEntry) -> None",17-18,false,2,1,logs
MemorySink.close,method,() -> None,20-21,false,2,1,stops
TestMetaLogSync.test_small_args_logged_as_repr,method,(logger),35-51,false,17,1,checks small args logged as repr
TestMetaLogSync.test_large_bytes_extracted_as_metadata,method,(logger),53-74,false,22,1,checks large bytes extracted as metadata
TestMetaLogSync.test_return_value_not_stored_raw,method,(logger),76-88,false,13,1,checks return value not stored raw
TestMetaLogSync.test_exception_logged_with_meta,method,(logger),90-104,false,15,1,checks exception logged with meta
TestMetaLogSync.test_custom_level,method,(logger),106-114,false,9,1,checks custom level
TestMetaLogSync.test_extract_fields_custom,method,(logger),116-131,false,16,1,checks extract fields custom
TestMetaLogSync.test_duration_recorded,method,(logger),133-142,false,10,1,checks duration recorded
TestMetaLogSync.test_function_name_captured,method,(logger),144-152,false,9,1,checks function name captured
TestMetaLogAsync.test_async_basic,method,(logger),158-169,true,12,1,checks async basic
TestMetaLogAsync.test_async_exception,method,(logger),172-183,true,12,1,checks async exception
TestMetaLogAsync.test_async_large_bytes,method,(logger),186-201,true,16,1,checks async large bytes
TestMetaLogAsync.test_async_preserves_coroutine,method,(logger),204-211,true,8,1,checks async preserves coroutine
TestMetaLogReturnMeta.test_large_return_extracted,method,(logger),216-228,false,13,1,checks large return extracted
TestMetaLogReturnMeta.test_small_return_as_repr,method,(logger),230-239,false,10,1,checks small return as repr
nfo/auto.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
_should_patch,function,"(name:str, obj:Any, module_name:str, include_private:bool=False) -> bool",33-55,false,23,12,Determine if an object should be auto-patched with logging.
auto_log,function,() -> int,58-138,false,81,9,Automatically wrap all functions in one or more modules with logging.
auto_log_by_name,function,() -> int,141-195,false,55,4,Like auto_log() but accepts module name strings instead of module objects.
nfo/llm.py:
functions[8]{name,kind,sig,loc,async,lines,cc,does}:
detect_prompt_injection,function,"(text:str) -> Optional[str]",40-52,false,13,4,Scan text for common prompt injection patterns.
scan_entry_for_injection,function,"(entry:LogEntry) -> Optional[str]",55-75,false,21,11,Scan a LogEntry's args/kwargs for prompt injection attempts.
LLMSink.__init__,method,"(model:str='gpt-4o-mini') -> None",108-126,false,19,3,creates
LLMSink._build_user_prompt,method,"(entry:LogEntry) -> str",128-144,false,17,5,creates user prompt
LLMSink._analyze,method,"(entry:LogEntry) -> str",146-164,false,19,3,Call LLM via litellm and return analysis text.
LLMSink._process,method,"(entry:LogEntry) -> None",166-187,false,22,9,Analyze entry and enrich it.
LLMSink.write,method,"(entry:LogEntry) -> None",189-194,false,6,2,logs
LLMSink.close,method,() -> None,196-198,false,3,2,stops
nfo/configure.py:
functions[6]{name,kind,sig,loc,async,lines,cc,does}:
get_global_meta_policy,function,"() -> Optional[Any]",27-29,false,3,1,"Return the globally configured :class:`~nfo.meta.ThresholdPolicy` (if any)."
get_global_auto_extract_meta,function,() -> bool,32-34,false,3,1,"Return ``True`` if ``auto_extract_meta`` was enabled via :func:`configure`."
_parse_sink_spec,function,"(spec:str) -> Sink",37-68,false,32,10,"Parse a sink specification string like 'sqlite:logs.db' or 'csv:logs.csv'."
configure,function,() -> Logger,120-328,false,209,36,Configure nfo logging for the entire project.
_StdlibBridge.__init__,method,"(nfo_logger:Logger) -> None",81-83,false,3,1,creates
_StdlibBridge.emit,method,"(record:Any) -> None",85-117,false,33,13,sends
nfo/extractors.py:
functions[10]{name,kind,sig,loc,async,lines,cc,does}:
detect_format,function,"(data:bytes) -> Optional[str]",39-44,false,6,3,Detect file format from magic bytes.
extract_image_meta,function,"(data:bytes) -> Dict[str, Any]",52-79,false,28,10,Extract metadata from an image without external dependencies.
extract_binary_meta,function,"(data:bytes) -> Dict[str, Any]",82-98,false,17,4,General metadata for arbitrary binary data.
extract_file_meta,function,"(file_obj:Any) -> Dict[str, Any]",101-118,false,18,7,Metadata from a file-like object (without reading its contents).
extract_numpy_meta,function,"(arr:Any) -> Dict[str, Any]",121-136,false,16,3,Metadata from a numpy ndarray (duck-typed).
extract_dataframe_meta,function,"(df:Any) -> Dict[str, Any]",139-150,false,12,4,Metadata from a pandas DataFrame (duck-typed).
extract_wav_meta,function,"(data:bytes) -> Dict[str, Any]",153-167,false,15,7,Extract metadata from WAV file header.
register_extractor,function,"(type_check:Callable[Any,bool], extractor:Callable[Any,Dict[str,Any]]) -> None",177-187,false,11,1,Register a custom metadata extractor.
unregister_all_extractors,function,() -> None,190-192,false,3,1,Remove all custom extractors (useful in tests).
extract_meta,function,"(value:Any) -> Optional[Dict[str, Any]]",200-243,false,44,17,Auto-detect value type and extract metadata.
nfo/webhook.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
WebhookSink.__init__,method,"(url:str, delegate:Optional[Sink]=None) -> None",36-52,false,17,4,creates
WebhookSink._build_payload,method,"(entry:LogEntry) -> Dict[str, Any]",54-107,false,54,12,Build webhook payload based on format.
WebhookSink._send,method,"(payload:Dict[str,Any]) -> None",109-121,false,13,2,"Send payload via HTTP POST (fire-and-forget, no crash on failure)."
WebhookSink.write,method,"(entry:LogEntry) -> None",123-131,false,9,3,logs
WebhookSink.close,method,() -> None,133-135,false,3,2,stops
nfo/buffered_sink.py:
functions[7]{name,kind,sig,loc,async,lines,cc,does}:
AsyncBufferedSink.__init__,method,"(delegate:Sink, buffer_size:int=100, flush_interval:float=1.0, flush_on_error:bool=True) -> None",32-53,false,22,1,creates
AsyncBufferedSink.write,method,"(entry:LogEntry) -> None",57-67,false,11,5,logs
AsyncBufferedSink.flush,method,() -> None,69-71,false,3,1,Force an immediate flush of the buffer (blocking).
AsyncBufferedSink.close,method,() -> None,73-80,false,8,2,stops
AsyncBufferedSink.pending,method,() -> int,83-85,false,3,1,Number of entries waiting to be flushed.
AsyncBufferedSink._flush_loop,method,() -> None,89-93,false,5,2,flush loop
AsyncBufferedSink._do_flush,method,() -> None,95-105,false,11,4,do flush
nfo/__init__.py:
functions[2]{name,kind,sig,loc,async,lines,cc,does}:
_lazy_click,function,(),27-29,false,3,1,lazy click
__getattr__,function,"(name:str)",32-39,false,8,3,getattr
nfo/ring_buffer_sink.py:
functions[6]{name,kind,sig,loc,async,lines,cc,does}:
RingBufferSink.__init__,method,"(delegate:Sink, capacity:int=1000, trigger_levels:Optional[Sequence[str]]=None, include_trigger:bool=True) -> None",30-44,false,15,3,creates
RingBufferSink.write,method,"(entry:LogEntry) -> None",48-65,false,18,6,logs
RingBufferSink.close,method,() -> None,67-70,false,4,1,stops
RingBufferSink.buffered,method,() -> int,73-75,false,3,1,Number of entries currently in the ring buffer.
RingBufferSink.flush_count,method,() -> int,78-80,false,3,1,Number of times the buffer has been flushed (error events seen).
RingBufferSink.capacity,method,() -> int,83-85,false,3,2,Maximum ring buffer size.
nfo/__main__.py:
functions[9]{name,kind,sig,loc,async,lines,cc,does}:
_setup_logger,function,"(sink_specs:list[str], env:Any=None)",26-43,false,18,3,Build nfo Logger from CLI sink specs.
cmd_run,function,(args),46-124,false,79,20,Run a command and log it through nfo.
cmd_logs,function,(args),127-198,false,72,16,Query nfo logs from SQLite database.
cmd_version,function,(args),201-204,false,4,1,Print nfo version.
cmd_serve,function,(args),207-234,false,28,6,Start nfo HTTP logging service.
_run_inline_server,function,"(host:str, port:int)",237-329,false,93,5,Run a minimal nfo HTTP service inline.
_detect_language,function,"(cmd:str) -> str",332-353,false,22,11,Guess language from command name.
_parse_duration,function,"(spec:str) -> float",356-365,false,10,4,"Parse duration like '24h', '30m', '7d' to hours."
main,function,(),368-441,false,74,7,main
nfo/meta.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
sizeof,function,"(obj:Any) -> int",52-63,false,12,5,Best-effort size of *obj* in bytes.
ThresholdPolicy.should_extract_meta,method,"(value:Any) -> bool",24-40,false,17,9,Return True if *value* should be represented as metadata.
ThresholdPolicy.should_extract_return_meta,method,"(value:Any) -> bool",42-49,false,8,1,"Like :meth:`should_extract_meta` but uses ``max_return_bytes``."
nfo/binary_router.py:
functions[4]{name,kind,sig,loc,async,lines,cc,does}:
BinaryAwareRouter.__init__,method,"(lightweight_sink:Sink, full_sink:Sink, heavy_sink:Optional[Sink]=None, size_threshold:int=65536) -> None",26-36,false,11,1,creates
BinaryAwareRouter.write,method,"(entry:LogEntry) -> None",38-44,false,7,4,logs
BinaryAwareRouter._has_large_data,method,"(entry:LogEntry) -> bool",46-55,false,10,7,has large data
BinaryAwareRouter.close,method,() -> None,57-61,false,5,2,stops
nfo/models.py:
functions[7]{name,kind,sig,loc,async,lines,cc,does}:
_truncate_text,function,"(text:str, max_length:Optional[int]) -> str",13-20,false,8,4,Truncate text representation to a bounded length (if configured).
safe_repr,function,"(value:Any, max_length:Optional[int]=DEFAULT_MAX_REPR_LENGTH) -> str",23-29,false,7,2,Best-effort repr with defensive truncation.
LogEntry.now,method,() -> datetime,58-59,false,2,1,now
LogEntry.args_repr,method,() -> str,61-62,false,2,1,args repr
LogEntry.kwargs_repr,method,() -> str,64-65,false,2,1,kwargs repr
LogEntry.return_value_repr,method,() -> str,67-68,false,2,1,return value repr
LogEntry.as_dict,method,"() -> Dict[str, Any]",70-91,false,22,9,Convert to a flat dictionary suitable for serialization.
nfo/pipeline_sink.py:
functions[19]{name,kind,sig,loc,async,lines,cc,does}:
PipelineSink.__init__,method,"(delegate:Optional[Sink]=None, stream:Optional[TextIO]=None, width:int=72, buffer_timeout:float=10.0, color:bool=True, tick_counter:int=0)",63-84,false,22,2,creates
PipelineSink.tick_count,method,() -> int,89-91,false,3,1,Number of completed ticks rendered so far.
PipelineSink.pending_runs,method,() -> int,94-96,false,3,1,Number of pipeline runs currently buffered.
PipelineSink.session_cost,method,() -> float,99-101,false,3,1,Total cost across all rendered ticks.
PipelineSink.write,method,"(entry:LogEntry) -> None",105-121,false,17,5,logs
PipelineSink.close,method,() -> None,123-129,false,7,3,stops
PipelineSink._flush_stale,method,() -> None,133-141,false,9,4,Flush runs older than buffer_timeout (called under lock).
PipelineSink._flush_run,method,"(run_id:str) -> None",143-166,false,24,7,Render and output a completed pipeline run (called under lock).
PipelineSink._c,method,"(code:str, text:str) -> str",170-174,false,5,2,Apply ANSI color if enabled.
PipelineSink._render_block,method,"(run_id:str, entries:List[LogEntry]) -> str",176-227,false,52,8,Render a full pipeline tick block.
PipelineSink._render_step,method,"(entry:LogEntry, width:int) -> str",229-268,false,40,13,Render a single step line.
PipelineSink._step_summary,method,"(entry:LogEntry) -> str",270-295,false,26,7,Extract a short summary string from entry extra fields.
PipelineSink._format_metric,method,"(key:str, val:Any) -> str",297-319,false,23,2,Format a single metric for display.
PipelineSink._render_sub_lines,method,"(entry:LogEntry, width:int) -> List[str]",321-358,false,38,11,Render sub-lines for decisions and annotations.
PipelineSink._render_footer,method,"(completion:Optional[LogEntry], steps:List[LogEntry], width:int) -> str",360-393,false,34,12,Render the summary footer line.
PipelineSink._render_data_flow,method,"(steps:List[LogEntry], width:int) -> str",397-418,false,22,10,Render a data flow summary showing sizes at key steps.
PipelineSink._render_cost_line,method,"(width:int) -> str",420-431,false,12,4,Render rolling cost summary if any cost was tracked.
PipelineSink._visible_len,method,"(text:str) -> int",434-437,false,4,1,Length of text excluding ANSI escape sequences.
PipelineSink._ansi_pad,method,"(text:str) -> int",439-441,false,3,1,Extra characters added by ANSI codes (for padding calculations).
nfo/decorators.py:
functions[14]{name,kind,sig,loc,async,lines,cc,does}:
_get_default_logger,function,() -> Any,23-28,false,6,2,retrieves default logger
set_default_logger,function,"(logger:Any) -> None",31-34,false,4,1,Replace the module-level default logger used by decorators.
_arg_types,function,"(args:tuple, kwargs:dict) -> tuple",41-44,false,4,3,arg types
_module_of,function,"(func:Callable) -> str",47-48,false,2,2,module of
_should_sample,function,"(sample_rate:Optional[float]) -> bool",51-62,false,12,4,Return True if this call should be logged based on *sample_rate*.
_maybe_extract,function,"(args:tuple, kwargs:dict, result:Any, extract_meta_flag:bool, meta_policy:Any) -> Optional[Dict[str, Any]]",65-117,false,53,15,Build ``extra`` dict with metadata when *extract_meta_flag* is True.
log_call,function,"(func:F) -> F",125-125,false,1,1,logs call
log_call,function,"() -> Callable[[F], F]",128-136,false,9,1,logs call
log_call,function,"(func:Optional[F]=None) -> Any",138-284,false,147,2,Decorator that automatically logs function calls.
catch,function,"(func:F) -> F",292-292,false,1,1,catch
catch,function,"() -> Callable[[F], F]",295-304,false,10,1,catch
catch,function,"(func:Optional[F]=None) -> Any",306-434,false,129,2,Decorator that logs calls **and** suppresses exceptions.
decision_log,function,"(func:Optional[Callable]=None) -> Any",441-571,false,131,2,Decorator that logs decision outcomes with structured reasons.
_build_decision_extra,function,"(decision_name:str, result:Any) -> Dict[str, Any]",574-589,false,16,6,Extract decision/reason from the function return value.
nfo/terminal.py:
functions[9]{name,kind,sig,loc,async,lines,cc,does}:
TerminalSink.__init__,method,"(format:str='color', stream:Optional[TextIO]=None, show_args:bool=True, show_return:bool=True, show_duration:bool=True, show_traceback:bool=True, max_width:int=120)",35-54,false,20,2,creates
TerminalSink.format,method,() -> str,57-58,false,2,1,formats
TerminalSink.write,method,"(entry:LogEntry) -> None",60-72,false,13,2,logs
TerminalSink._write_ascii,method,"(entry:LogEntry) -> None",74-86,false,13,8,Classic single-line format.
TerminalSink._write_color,method,"(entry:LogEntry) -> None",88-125,false,38,13,ANSI colored format — replaces typical CLI logs.
TerminalSink._write_markdown,method,"(entry:LogEntry) -> None",127-162,false,36,12,Markdown format — rendered via rich or written as plain text.
TerminalSink._write_toon,method,"(entry:LogEntry) -> None",164-219,false,56,24,"Compact TOON format — minimal, machine+human readable."
TerminalSink._write_table,method,"(entry:LogEntry) -> None",221-262,false,42,5,Tabular format via rich.table (fallback to ascii).
TerminalSink.close,method,() -> None,264-266,false,3,2,stops
nfo/env.py:
functions[14]{name,kind,sig,loc,async,lines,cc,does}:
_detect_environment,function,() -> str,26-44,false,19,9,Auto-detect environment from common env vars.
_detect_trace_id,function,"() -> Optional[str]",47-54,false,8,3,Extract trace ID from common tracing env vars.
_detect_version,function,"() -> Optional[str]",57-64,false,8,3,Extract app version from common env vars or git.
generate_trace_id,function,() -> str,67-69,false,3,1,Generate a new trace ID.
EnvTagger.__init__,method,"(delegate:Sink) -> None",86-103,false,18,6,creates
EnvTagger.write,method,"(entry:LogEntry) -> None",105-112,false,8,7,logs
EnvTagger.close,method,() -> None,114-115,false,2,1,stops
DynamicRouter.__init__,method,"(rules:Sequence[tuple[Callable[Any,bool],Sink]], default:Optional[Sink]=None) -> None",143-149,false,7,1,creates
DynamicRouter.write,method,"(entry:LogEntry) -> None",151-160,false,10,5,logs
DynamicRouter.close,method,() -> None,162-169,false,8,5,stops
DiffTracker.__init__,method,"(delegate:Sink) -> None",190-193,false,4,1,creates
DiffTracker._make_key,method,"(entry:LogEntry) -> str",196-199,false,4,1,creates key
DiffTracker.write,method,"(entry:LogEntry) -> None",201-222,false,22,6,logs
DiffTracker.close,method,() -> None,224-225,false,2,1,stops
nfo/meta_decorators.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
_extract_args_meta,function,"(args:tuple, param_names:list, policy:ThresholdPolicy, extract_fields:Optional[Dict[str,Callable]]=None) -> list",29-48,false,20,7,Build metadata list for positional arguments.
_extract_kwargs_meta,function,"(kwargs:dict, policy:ThresholdPolicy, extract_fields:Optional[Dict[str,Callable]]=None) -> dict",51-66,false,16,6,Build metadata dict for keyword arguments.
_extract_return_meta,function,"(value:Any, policy:ThresholdPolicy) -> Any",69-74,false,6,3,Build metadata for the return value.
_emit,function,"(entry:LogEntry, logger:Any) -> None",77-80,false,4,2,sends
meta_log,function,"(func:Optional[Callable]=None) -> Any",83-243,false,161,3,Decorator that logs metadata instead of raw binary data.
nfo/prometheus.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
PrometheusSink.__init__,method,"(delegate:Optional[Sink]=None) -> None",51-101,false,51,4,creates
PrometheusSink._start_server,method,"(port:int) -> None",103-107,false,5,2,starts server
PrometheusSink.write,method,"(entry:LogEntry) -> None",109-127,false,19,7,logs
PrometheusSink.close,method,() -> None,129-131,false,3,2,stops
PrometheusSink.get_metrics,method,() -> bytes,133-135,false,3,1,Return current metrics in Prometheus text format.
nfo/logged.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
_should_wrap,function,"(name:str, attr:Any) -> bool",34-44,false,11,5,Determine if a class attribute should be auto-logged.
skip,function,"(func:Callable) -> Callable",47-50,false,4,1,Mark a public method to be excluded from @logged auto-wrapping.
logged,function,"(cls:C) -> C",54-54,false,1,1,logs
logged,function,"() -> Callable[[C], C]",57-62,false,6,1,logs
logged,function,"(cls:Optional[C]=None) -> Any",64-99,false,36,2,Class decorator that auto-wraps all public methods with @log_call.
nfo/json_sink.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
JSONSink.__init__,method,"(file_path:Any='logs.jsonl') -> None",38-48,false,11,1,creates
JSONSink.write,method,"(entry:LogEntry) -> None",50-65,false,16,6,logs
JSONSink.close,method,() -> None,67-69,false,3,2,stops
nfo/click.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
nfo_options,function,"(func:Any) -> Any",199-227,false,29,1,Decorator that adds common nfo CLI options to a Click command/group.
NfoGroup.__init__,method,() -> None,31-33,false,3,1,creates
NfoGroup.invoke,method,"(ctx:Any) -> Any",35-84,false,50,11,invoke
NfoGroup._resolve_logger,method,"(ctx:Any) -> Logger",86-111,false,26,4,Get or create the nfo Logger from Click context.
NfoCommand.invoke,method,"(ctx:Any) -> Any",125-196,false,72,11,invoke
nfo/logger.py:
functions[6]{name,kind,sig,loc,async,lines,cc,does}:
Logger.__init__,method,"(name:str='nfo', level:str='DEBUG', sinks:Optional[List[Sink]]=None, propagate_stdlib:bool=True) -> None",22-45,false,24,4,creates
Logger.add_sink,method,"(sink:Sink) -> \"Logger\"",49-52,false,4,1,Register a new sink and return *self* for chaining.
Logger.remove_sink,method,"(sink:Sink) -> None",54-55,false,2,1,deletes sink
Logger.emit,method,"(entry:LogEntry) -> None",59-67,false,9,3,Send a log entry to all sinks and (optionally) stdlib.
Logger._format_stdlib,method,"(entry:LogEntry) -> str",70-82,false,13,6,formats stdlib
Logger.close,method,() -> None,86-89,false,4,2,Close all sinks.
nfo/sinks.py:
functions[15]{name,kind,sig,loc,async,lines,cc,does}:
Sink.write,method,"(entry:LogEntry) -> None",42-43,false,2,1,logs
Sink.close,method,() -> None,46-47,false,2,1,stops
SQLiteSink.__init__,method,"(db_path:Any='logs.db', table:str='logs') -> None",57-62,false,6,1,creates
SQLiteSink._get_conn,method,() -> sqlite3.Connection,66-69,false,4,2,retrieves conn
SQLiteSink._ensure_table,method,() -> None,71-97,false,27,1,ensure table
SQLiteSink.write,method,"(entry:LogEntry) -> None",101-112,false,12,2,logs
SQLiteSink.close,method,() -> None,114-118,false,5,2,stops
CSVSink.__init__,method,"(file_path:Any='logs.csv') -> None",128-131,false,4,1,creates
CSVSink._write_header_if_needed,method,() -> None,133-137,false,5,3,logs header if needed
CSVSink.write,method,"(entry:LogEntry) -> None",139-144,false,6,2,logs
CSVSink.close,method,() -> None,146-147,false,2,1,stops
MarkdownSink.__init__,method,"(file_path:Any='logs.md') -> None",157-160,false,4,1,creates
MarkdownSink._write_header_if_needed,method,() -> None,162-165,false,4,3,logs header if needed
MarkdownSink.write,method,"(entry:LogEntry) -> None",167-194,false,28,7,logs
MarkdownSink.close,method,() -> None,196-197,false,2,1,stops
examples/http-service/main.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
_store_entry,function,"(entry:LogEntry) -> dict",118-147,false,30,6,Write a single log entry through nfo and return result.
log_call,function,"(entry:LogEntry)",151-154,true,4,1,Log a single call from any language.
log_batch,function,"(batch:LogBatchRequest)",158-161,true,4,2,Log multiple entries at once.
get_logs,function,"(language:Optional[str]=Query(None), level:Optional[str]=Query(None), limit:int=Query(50, ge=1, le=1000))",165-187,true,23,3,Query stored logs from SQLite.
health,function,(),191-192,true,2,1,health
examples/auto-log/main.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
create_user,function,"(name:str, email:str) -> dict",29-31,false,3,1,Create a new user.
delete_user,function,"(user_id:int) -> bool",34-38,false,5,2,Delete user by ID.
calculate_total,function,"(prices:list) -> float",41-43,false,3,1,Sum a list of prices.
health_check,function,() -> str,47-49,false,3,1,"Excluded from auto_log — called frequently, not interesting."
_internal_helper,function,(),52-54,false,3,1,Private function — auto_log skips these by default.
examples/bash-wrapper/main.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
setup_logger,function,() -> Logger,31-41,false,11,1,initializes logger
run_bash,function,"(script_path:str) -> dict",45-57,false,13,2,Run a Bash script and capture its output through nfo logging.
main,function,(),60-79,false,20,3,main
examples/sqlite-sink/main.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
setup_logger,function,() -> Logger,13-17,false,5,1,initializes logger
fetch_user,function,"(user_id:int) -> dict",21-24,false,4,2,retrieves user
parse_config,function,"(raw:str) -> dict",28-31,false,4,1,Parse config string.
examples/go-client/main.go:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
NewNfoClient,function,(baseURL string),"-",false,1,1,creates nfo client
Log,function,(entry LogEntry) -> error,"-",false,1,1,logs
LogCall,function,"(cmd string, args []string, fn func() -> (string, error)","-",false,1,1,logs call
getEnv,function,"(key, fallback string) -> string","-",false,1,1,retrieves env
main,function,(),"-",false,1,1,main
examples/configure/main.py:
functions[4]{name,kind,sig,loc,async,lines,cc,does}:
process_order,function,"(order_id:str, amount:float) -> dict",40-41,false,2,1,processes order
parse_config,function,"(raw:str) -> dict",45-47,false,3,1,parses config
PaymentService.charge,method,"(amount:float) -> bool",52-53,false,2,1,charge
PaymentService.refund,method,"(tx_id:str) -> dict",55-56,false,2,1,refund
examples/basic-usage/main.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
add,function,"(a:int, b:int) -> int",9-11,false,3,1,Add two numbers.
greet,function,"(name:str) -> str",15-16,false,2,1,greet
risky_divide,function,"(a:float, b:float) -> float",20-22,false,3,1,Divides a by b.
examples/markdown-sink/main.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
setup_logger,function,() -> Logger,12-16,false,5,1,initializes logger
compute,function,"(x:float, y:float) -> float",20-21,false,2,1,processes
dangerous,function,"(data:str) -> dict",25-27,false,3,1,dangerous
examples/csv-sink/main.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
setup_logger,function,() -> Logger,12-16,false,5,1,initializes logger
multiply,function,"(a:int, b:int) -> int",20-21,false,2,1,multiply
process_items,function,"(items:list) -> int",25-27,false,3,1,Process items and return count.
examples/grpc-service/server.py:
functions[6]{name,kind,sig,loc,async,lines,cc,does}:
_store_request,function,"(req:Any) -> nfo_pb2.LogResponse",88-119,false,32,10,"Convert a gRPC LogRequest to nfo LogEntry, emit, return response."
serve,function,"(port:int=GRPC_PORT, max_workers:int=10)",208-226,false,19,2,Start the gRPC server.
NfoLoggerServicer.LogCall,method,"(request, context)",129-131,false,3,1,Log a single function call.
NfoLoggerServicer.BatchLog,method,"(request, context)",133-139,false,7,2,Log multiple entries in one round-trip.
NfoLoggerServicer.StreamLog,method,"(request_iterator, context)",141-144,false,4,2,Stream log entries (bidirectional).
NfoLoggerServicer.QueryLogs,method,"(request, context)",146-201,false,56,11,Query stored logs from SQLite.
examples/grpc-service/client.py:
functions[1]{name,kind,sig,loc,async,lines,cc,does}:
run_demo,function,"(target:str='localhost:50051')",44-148,false,105,6,Run all four gRPC RPCs against nfo server.
examples/grpc-service/nfo_pb2_grpc.py:
functions[10]{name,kind,sig,loc,async,lines,cc,does}:
add_NfoLoggerServicer_to_server,function,"(servicer, server)",95-121,false,27,1,creates nfologgerservicer to server
NfoLoggerStub.__init__,method,(channel),33-58,false,26,1,Constructor.
NfoLoggerServicer.LogCall,method,"(request, context)",66-71,false,6,1,Log a single function call
NfoLoggerServicer.BatchLog,method,"(request, context)",73-78,false,6,1,Log multiple entries in one round-trip
NfoLoggerServicer.StreamLog,method,"(request_iterator, context)",80-85,false,6,1,Stream log entries (high-throughput)
NfoLoggerServicer.QueryLogs,method,"(request, context)",87-92,false,6,1,Query stored logs
NfoLogger.LogCall,method,"(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None)",131-155,false,25,1,logs call
NfoLogger.BatchLog,method,"(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None)",158-182,false,25,1,batch log
NfoLogger.StreamLog,method,"(request_iterator, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None)",185-209,false,25,1,stream log
NfoLogger.QueryLogs,method,"(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None)",212-236,false,25,1,retrieves logs
examples/multi-sink/main.py:
functions[4]{name,kind,sig,loc,async,lines,cc,does}:
setup_logger,function,() -> Logger,16-27,false,12,1,initializes logger
fibonacci,function,"(n:int) -> int",31-37,false,7,3,fibonacci
batch_process,function,"(items:list) -> dict",41-42,false,2,1,batch process
parse_int,function,"(value:str) -> int",46-47,false,2,1,parses int
examples/env-tagger/main.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
demo_env_tagger,function,(),36-68,false,33,2,EnvTagger wraps a sink to auto-tag every log entry.
demo_dynamic_router,function,(),71-99,false,29,1,DynamicRouter sends logs to different sinks based on rules.
demo_diff_tracker,function,(),102-121,false,20,1,DiffTracker detects when function output changes.
examples/env-config/main.py:
functions[4]{name,kind,sig,loc,async,lines,cc,does}:
create_order,function,"(order_id:str, amount:float) -> dict",96-97,false,2,1,creates order
parse_payload,function,"(raw:str) -> dict",101-103,false,3,1,parses payload
InventoryService.check_stock,method,"(item_id:str) -> int",108-109,false,2,1,checks stock
InventoryService.reserve,method,"(item_id:str, qty:int) -> bool",111-114,false,4,2,reserve
examples/click-integration/demo_basic.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
cli,function,(),30-32,false,3,1,Demo CLI with automatic nfo logging.
greet,function,(name),37-39,false,3,1,Greet someone.
process,function,(count),44-49,false,6,2,Run a processing loop.
deploy,function,"(path, force)",55-62,false,8,2,Deploy to a target path.
fail,function,(),66-68,false,3,1,Command that fails (demonstrates error logging).
examples/click-integration/demo_configure.py:
functions[3]{name,kind,sig,loc,async,lines,cc,does}:
cli,function,(),26-28,false,3,1,Demo CLI using nfo.configure() with terminal sink.
deploy,function,"(target, force)",35-38,false,4,1,Deploy to target.
migrate,function,(db_path),44-47,false,4,1,Run database migration.
examples/click-integration/demo_formats.py:
functions[2]{name,kind,sig,loc,async,lines,cc,does}:
make_entry,function,"(function_name='deploy', args=('prod',), kwargs=None, return_value=None, duration_ms=2300.0, exception=None, exception_type=None)",15-38,false,24,4,creates entry
demo,function,(),41-67,false,27,2,demo
examples/async-usage/main.py:
functions[5]{name,kind,sig,loc,async,lines,cc,does}:
setup_logger,function,() -> Logger,22-29,false,8,1,initializes logger
fetch_data,function,"(url:str) -> dict",33-36,true,4,1,Simulate an async HTTP fetch.
process_batch,function,"(items:list) -> int",40-43,true,4,1,Process items concurrently.
risky_fetch,function,"(url:str) -> dict",47-52,true,6,2,"Fetch that may fail — returns {} on error instead of raising."
main,function,(),55-96,true,42,2,main