logler 1.1.2__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {logler-1.1.2 → logler-1.2.0}/Cargo.lock +34 -35
  2. {logler-1.1.2 → logler-1.2.0}/Cargo.toml +1 -1
  3. {logler-1.1.2 → logler-1.2.0}/PKG-INFO +125 -44
  4. {logler-1.1.2 → logler-1.2.0}/README.md +124 -43
  5. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/hierarchy.rs +132 -36
  6. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/index.rs +10 -0
  7. logler-1.2.0/crates/logler-core/src/investigate.rs +977 -0
  8. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/lib.rs +2 -0
  9. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/parser.rs +178 -0
  10. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/types.rs +37 -2
  11. {logler-1.1.2 → logler-1.2.0}/crates/logler-py/src/lib.rs +48 -0
  12. {logler-1.1.2 → logler-1.2.0}/pyproject.toml +3 -1
  13. {logler-1.1.2 → logler-1.2.0}/src/logler/cli.py +37 -93
  14. {logler-1.1.2 → logler-1.2.0}/src/logler/helpers.py +0 -85
  15. {logler-1.1.2 → logler-1.2.0}/src/logler/investigate.py +255 -473
  16. {logler-1.1.2 → logler-1.2.0}/src/logler/llm_cli.py +942 -128
  17. {logler-1.1.2 → logler-1.2.0}/src/logler/models.py +4 -0
  18. {logler-1.1.2 → logler-1.2.0}/src/logler/parser.py +3 -0
  19. {logler-1.1.2 → logler-1.2.0}/src/logler/tree_formatter.py +26 -5
  20. logler-1.1.2/crates/logler-core/src/investigate.rs +0 -515
  21. {logler-1.1.2 → logler-1.2.0}/LICENSE +0 -0
  22. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/Cargo.toml +0 -0
  23. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/filter.rs +0 -0
  24. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/reader.rs +0 -0
  25. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/stats.rs +0 -0
  26. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/thread_tracker.rs +0 -0
  27. {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/trace.rs +0 -0
  28. {logler-1.1.2 → logler-1.2.0}/crates/logler-py/Cargo.toml +0 -0
  29. {logler-1.1.2 → logler-1.2.0}/src/logler/__init__.py +0 -0
  30. {logler-1.1.2 → logler-1.2.0}/src/logler/bootstrap.py +0 -0
  31. {logler-1.1.2 → logler-1.2.0}/src/logler/cache.py +0 -0
  32. {logler-1.1.2 → logler-1.2.0}/src/logler/log_reader.py +0 -0
  33. {logler-1.1.2 → logler-1.2.0}/src/logler/safe_regex.py +0 -0
  34. {logler-1.1.2 → logler-1.2.0}/src/logler/sql.py +0 -0
  35. {logler-1.1.2 → logler-1.2.0}/src/logler/terminal.py +0 -0
  36. {logler-1.1.2 → logler-1.2.0}/src/logler/tracker.py +0 -0
  37. {logler-1.1.2 → logler-1.2.0}/src/logler/watcher.py +0 -0
@@ -253,9 +253,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
253
253
 
254
254
  [[package]]
255
255
  name = "cc"
256
- version = "1.2.53"
256
+ version = "1.2.55"
257
257
  source = "registry+https://github.com/rust-lang/crates.io-index"
258
- checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932"
258
+ checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
259
259
  dependencies = [
260
260
  "find-msvc-tools",
261
261
  "shlex",
@@ -310,9 +310,9 @@ dependencies = [
310
310
 
311
311
  [[package]]
312
312
  name = "clap"
313
- version = "4.5.54"
313
+ version = "4.5.56"
314
314
  source = "registry+https://github.com/rust-lang/crates.io-index"
315
- checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
315
+ checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e"
316
316
  dependencies = [
317
317
  "clap_builder",
318
318
  "clap_derive",
@@ -320,9 +320,9 @@ dependencies = [
320
320
 
321
321
  [[package]]
322
322
  name = "clap_builder"
323
- version = "4.5.54"
323
+ version = "4.5.56"
324
324
  source = "registry+https://github.com/rust-lang/crates.io-index"
325
- checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
325
+ checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0"
326
326
  dependencies = [
327
327
  "anstream",
328
328
  "anstyle",
@@ -332,9 +332,9 @@ dependencies = [
332
332
 
333
333
  [[package]]
334
334
  name = "clap_derive"
335
- version = "4.5.49"
335
+ version = "4.5.55"
336
336
  source = "registry+https://github.com/rust-lang/crates.io-index"
337
- checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
337
+ checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
338
338
  dependencies = [
339
339
  "heck 0.5.0",
340
340
  "proc-macro2",
@@ -531,9 +531,9 @@ dependencies = [
531
531
 
532
532
  [[package]]
533
533
  name = "find-msvc-tools"
534
- version = "0.1.8"
534
+ version = "0.1.9"
535
535
  source = "registry+https://github.com/rust-lang/crates.io-index"
536
- checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
536
+ checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
537
537
 
538
538
  [[package]]
539
539
  name = "form_urlencoded"
@@ -778,12 +778,11 @@ dependencies = [
778
778
 
779
779
  [[package]]
780
780
  name = "hyper-util"
781
- version = "0.1.19"
781
+ version = "0.1.20"
782
782
  source = "registry+https://github.com/rust-lang/crates.io-index"
783
- checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f"
783
+ checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
784
784
  dependencies = [
785
785
  "bytes",
786
- "futures-core",
787
786
  "http",
788
787
  "http-body",
789
788
  "hyper",
@@ -794,9 +793,9 @@ dependencies = [
794
793
 
795
794
  [[package]]
796
795
  name = "iana-time-zone"
797
- version = "0.1.64"
796
+ version = "0.1.65"
798
797
  source = "registry+https://github.com/rust-lang/crates.io-index"
799
- checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
798
+ checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
800
799
  dependencies = [
801
800
  "android_system_properties",
802
801
  "core-foundation-sys",
@@ -953,7 +952,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
953
952
 
954
953
  [[package]]
955
954
  name = "logler-cli"
956
- version = "1.1.2"
955
+ version = "1.2.0"
957
956
  dependencies = [
958
957
  "anyhow",
959
958
  "clap",
@@ -968,7 +967,7 @@ dependencies = [
968
967
 
969
968
  [[package]]
970
969
  name = "logler-core"
971
- version = "1.1.2"
970
+ version = "1.2.0"
972
971
  dependencies = [
973
972
  "anyhow",
974
973
  "async-stream",
@@ -992,7 +991,7 @@ dependencies = [
992
991
 
993
992
  [[package]]
994
993
  name = "logler-py"
995
- version = "1.1.2"
994
+ version = "1.2.0"
996
995
  dependencies = [
997
996
  "anyhow",
998
997
  "logler-core",
@@ -1004,7 +1003,7 @@ dependencies = [
1004
1003
 
1005
1004
  [[package]]
1006
1005
  name = "logler-server"
1007
- version = "1.1.2"
1006
+ version = "1.2.0"
1008
1007
  dependencies = [
1009
1008
  "anyhow",
1010
1009
  "axum",
@@ -1217,9 +1216,9 @@ dependencies = [
1217
1216
 
1218
1217
  [[package]]
1219
1218
  name = "portable-atomic"
1220
- version = "1.13.0"
1219
+ version = "1.13.1"
1221
1220
  source = "registry+https://github.com/rust-lang/crates.io-index"
1222
- checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
1221
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
1223
1222
 
1224
1223
  [[package]]
1225
1224
  name = "ppv-lite86"
@@ -1306,9 +1305,9 @@ dependencies = [
1306
1305
 
1307
1306
  [[package]]
1308
1307
  name = "quote"
1309
- version = "1.0.43"
1308
+ version = "1.0.44"
1310
1309
  source = "registry+https://github.com/rust-lang/crates.io-index"
1311
- checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
1310
+ checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
1312
1311
  dependencies = [
1313
1312
  "proc-macro2",
1314
1313
  ]
@@ -1560,9 +1559,9 @@ dependencies = [
1560
1559
 
1561
1560
  [[package]]
1562
1561
  name = "slab"
1563
- version = "0.4.11"
1562
+ version = "0.4.12"
1564
1563
  source = "registry+https://github.com/rust-lang/crates.io-index"
1565
- checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
1564
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
1566
1565
 
1567
1566
  [[package]]
1568
1567
  name = "smallvec"
@@ -1572,9 +1571,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
1572
1571
 
1573
1572
  [[package]]
1574
1573
  name = "socket2"
1575
- version = "0.6.1"
1574
+ version = "0.6.2"
1576
1575
  source = "registry+https://github.com/rust-lang/crates.io-index"
1577
- checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881"
1576
+ checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0"
1578
1577
  dependencies = [
1579
1578
  "libc",
1580
1579
  "windows-sys 0.60.2",
@@ -1888,9 +1887,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
1888
1887
 
1889
1888
  [[package]]
1890
1889
  name = "uuid"
1891
- version = "1.19.0"
1890
+ version = "1.20.0"
1892
1891
  source = "registry+https://github.com/rust-lang/crates.io-index"
1893
- checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a"
1892
+ checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f"
1894
1893
  dependencies = [
1895
1894
  "getrandom 0.3.4",
1896
1895
  "js-sys",
@@ -2215,18 +2214,18 @@ checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
2215
2214
 
2216
2215
  [[package]]
2217
2216
  name = "zerocopy"
2218
- version = "0.8.33"
2217
+ version = "0.8.37"
2219
2218
  source = "registry+https://github.com/rust-lang/crates.io-index"
2220
- checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd"
2219
+ checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac"
2221
2220
  dependencies = [
2222
2221
  "zerocopy-derive",
2223
2222
  ]
2224
2223
 
2225
2224
  [[package]]
2226
2225
  name = "zerocopy-derive"
2227
- version = "0.8.33"
2226
+ version = "0.8.37"
2228
2227
  source = "registry+https://github.com/rust-lang/crates.io-index"
2229
- checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1"
2228
+ checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0"
2230
2229
  dependencies = [
2231
2230
  "proc-macro2",
2232
2231
  "quote",
@@ -2235,6 +2234,6 @@ dependencies = [
2235
2234
 
2236
2235
  [[package]]
2237
2236
  name = "zmij"
2238
- version = "1.0.16"
2237
+ version = "1.0.19"
2239
2238
  source = "registry+https://github.com/rust-lang/crates.io-index"
2240
- checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65"
2239
+ checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445"
@@ -3,7 +3,7 @@ members = ["crates/logler-py"]
3
3
  resolver = "2"
4
4
 
5
5
  [workspace.package]
6
- version = "1.1.2"
6
+ version = "1.2.0"
7
7
  edition = "2021"
8
8
  authors = ["Logler Contributors"]
9
9
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: logler
3
- Version: 1.1.2
3
+ Version: 1.2.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -73,94 +73,115 @@ A modern, feature-rich log viewer that makes debugging a pleasure. View logs in
73
73
  - 🔍 **Semantic Search** - Find errors by description, not just exact matches
74
74
  - 🧵 **Thread Following** - Reconstruct request flows across distributed systems
75
75
  - 🌳 **Hierarchy Visualization** - Tree and waterfall views of nested operations, bottleneck detection
76
- - 📊 **Pattern Detection** - Automatically find repeated errors and cascading failures
77
76
  - 💾 **SQL Queries** - DuckDB-powered custom analysis for deep investigation
78
77
  - 📈 **Statistical Analysis** - Z-scores, percentiles, correlations, anomaly detection
78
+ - 🌐 **OpenTelemetry Export** - Export traces to Jaeger, Zipkin, or OTLP collectors
79
79
  - 🌍 **Bilingual Docs** - Complete documentation in English and Japanese (日本語)
80
80
 
81
81
  ### 🚀 NEW: Advanced LLM Features
82
82
 
83
83
  **Designed specifically for AI agents with limited context windows:**
84
84
 
85
- - 💡 **Auto Insights** - `analyze_with_insights()` automatically detects patterns, errors, and suggests next steps
86
85
  - 📉 **Token-Efficient Output** - 44x token savings with summary/count/compact modes
87
86
  - 🔀 **Compare & Diff** - Compare successful vs failed requests, before/after deployments
88
87
  - 🌐 **Cross-Service Timeline** - Unified view across microservices for distributed debugging
89
88
  - 📝 **Investigation Sessions** - Track progress, undo/redo, save/resume investigations
90
89
  - 🎯 **Smart Sampling** - Representative sampling with multiple strategies (diverse, errors-focused, chronological)
91
90
  - 📄 **Report Generation** - Auto-generate markdown/text/JSON reports from investigation
92
- - 🤔 **Explain Feature** - Plain English explanations of cryptic errors with next steps
93
- - 💬 **Contextual Suggestions** - AI suggests what to investigate next based on findings
94
91
 
92
+ ### Public API Contract
93
+
94
+ Each code block carries a **Contract ID** (e.g., `[C02]`). The test suite in `tests/test_readme.py` executes these snippets against the documented public APIs. When this section changes, the tests must change with it — CI proves the README.
95
+
96
+ #### [C02] Token-efficient search
95
97
  ```python
96
98
  import logler.investigate as investigate
97
99
 
98
- # 🎯 One-line auto investigation with insights
99
- result = investigate.analyze_with_insights(files=["app.log"])
100
- print(result['insights']) # Automatic pattern detection, error analysis, suggestions
101
-
102
- # 📉 Token-efficient search (44x smaller output)
103
100
  errors = investigate.search(files=["app.log"], level="ERROR", output_format="summary")
104
101
  # Returns aggregated stats instead of all entries - perfect for limited context windows
102
+ ```
103
+
104
+ #### [C03] Compare threads
105
+ ```python
106
+ import logler.investigate as investigate
105
107
 
106
- # 🔀 Compare successful vs failed requests
107
108
  diff = investigate.compare_threads(
108
109
  files=["app.log"],
109
110
  correlation_a="req-success-123",
110
111
  correlation_b="req-failed-456"
111
112
  )
112
- print(diff['summary']) # "Thread B took 2341ms longer and had 5 errors (cache miss, timeout)"
113
+ print(diff['summary']) # Comparison of two request flows
114
+ ```
115
+
116
+ #### [C04] Cross-service timeline
117
+ ```python
118
+ import logler.investigate as investigate
113
119
 
114
- # 🌐 Cross-service distributed tracing
115
120
  timeline = investigate.cross_service_timeline(
116
121
  files={"api": ["api.log"], "db": ["db.log"], "cache": ["cache.log"]},
117
122
  correlation_id="req-12345"
118
123
  )
119
124
  # See request flow: API → DB → Cache with latency breakdown
125
+ ```
126
+
127
+ #### [C05] Investigation sessions
128
+ ```python
129
+ import logler.investigate as investigate
120
130
 
121
- # 📝 Track investigation with sessions
122
131
  session = investigate.InvestigationSession(files=["app.log"], name="incident_2024")
123
132
  session.search(level="ERROR")
124
- session.find_patterns()
125
133
  session.add_note("Database connection pool exhausted")
126
134
  report = session.generate_report(format="markdown") # Auto-generate report
135
+ ```
136
+
137
+ #### [C06] Smart sampling
138
+ ```python
139
+ import logler.investigate as investigate
127
140
 
128
- # 🎯 Smart sampling (representative sample of huge logs)
129
141
  sample = investigate.smart_sample(
130
142
  files=["huge.log"],
131
143
  strategy="errors_focused", # or "diverse", "representative", "chronological"
132
144
  sample_size=50
133
145
  )
146
+ ```
134
147
 
135
- # 🤔 Explain cryptic errors in plain English
136
- explanation = investigate.explain(error_message="Connection pool exhausted", context="production")
137
- print(explanation) # Common causes, next steps, production-specific advice
148
+ #### [C08] Thread hierarchy
149
+ ```python
150
+ import logler.investigate as investigate
138
151
 
139
- # 🌳 Hierarchical thread visualization (NEW!)
140
152
  hierarchy = investigate.follow_thread_hierarchy(
141
153
  files=["app.log"],
142
154
  root_identifier="req-123",
143
155
  min_confidence=0.8 # Only show high-confidence relationships
144
156
  )
145
-
146
157
  # Automatic bottleneck detection
147
- if hierarchy['bottleneck']:
158
+ if hierarchy.get('bottleneck'):
148
159
  print(f"Bottleneck: {hierarchy['bottleneck']['node_id']} took {hierarchy['bottleneck']['duration_ms']}ms")
160
+ ```
149
161
 
150
- # Get summary
162
+ #### [C09] Hierarchy summary
163
+ ```python
164
+ import logler.investigate as investigate
165
+
166
+ # Using hierarchy from [C08]
151
167
  summary = investigate.get_hierarchy_summary(hierarchy)
152
168
  print(summary) # Shows tree structure, errors, bottlenecks
169
+ ```
153
170
 
154
- # Visualize in CLI
171
+ #### [C10] Tree visualization
172
+ ```python
155
173
  from logler.tree_formatter import print_tree, print_waterfall
174
+
175
+ # Using hierarchy from [C08]
156
176
  print_tree(hierarchy, mode="detailed", show_duration=True)
157
- print_waterfall(hierarchy, width=100) # Waterfall timeline showing parallel operations
177
+ print_waterfall(hierarchy, width=100) # Waterfall timeline
158
178
  ```
159
179
 
160
180
  **📚 Complete LLM documentation:**
161
- - [English Guide](docs/LLM_README.md) - Complete API and examples
181
+ - [LLM CLI Reference](docs/LLM_CLI_REFERENCE.md) - All 17 CLI commands for AI agents
182
+ - [Python API Guide](docs/LLM_README.md) - Library API and examples
183
+ - [API Reference](docs/LLM_INVESTIGATION_API.md) - All investigation functions
162
184
  - [日本語ガイド](README.ja.md) - 完全なドキュメント
163
- - [API Reference](docs/LLM_INVESTIGATION_API.md) - All investigation tools
164
185
  - [Examples](examples/) - Production incident investigations
165
186
 
166
187
  ## 🚀 Quick Start
@@ -195,21 +216,56 @@ logler stats app.log --json # JSON output
195
216
 
196
217
  **Investigate logs with smart analysis:**
197
218
  ```bash
198
- logler investigate app.log --auto-insights # Auto-detect issues
199
219
  logler investigate app.log --errors # Analyze errors
200
- logler investigate app.log --patterns # Find repeated patterns
201
220
  logler investigate app.log --thread worker-1 # Follow specific thread
202
221
  logler investigate app.log --correlation req-123 # Follow correlation ID
222
+ logler investigate app.log --trace trace-abc123 # Follow distributed trace
203
223
  logler investigate app.log --output summary # Token-efficient output
204
224
 
205
225
  # 🌳 NEW: Hierarchical Thread Visualization
206
226
  logler investigate app.log --correlation req-123 --hierarchy # Show thread hierarchy tree
207
- logler investigate app.log --correlation trace-abc123 --hierarchy --waterfall # Show waterfall timeline
227
+ logler investigate app.log --trace trace-abc123 --hierarchy --waterfall # Show waterfall timeline
208
228
  logler investigate app.log --correlation req-123 --hierarchy --flamegraph # Show flamegraph view
209
229
  logler investigate app.log --hierarchy --show-error-flow # Analyze error propagation
210
230
  logler investigate app.log --thread worker-1 --hierarchy --max-depth 3 # Limit hierarchy depth
211
231
  ```
212
232
 
233
+ **LLM-first CLI (JSON output by default):**
234
+
235
+ Designed for AI agents - 17 commands with structured JSON output, no truncation.
236
+
237
+ ```bash
238
+ # Assessment & Overview
239
+ logler llm triage app.log --last 1h # Quick severity assessment
240
+ logler llm summarize app.log # Concise summary with stats
241
+ logler llm schema app.log # Infer log structure
242
+
243
+ # Discovery
244
+ logler llm ids app.log # Find all thread/correlation/trace IDs
245
+
246
+ # Search & Analysis (with filtering)
247
+ logler llm search app.log --level ERROR,WARN --tail 20 # Last 20 errors/warnings
248
+ logler llm search app.log --exclude-level DEBUG --service api # Filter by service
249
+ logler llm search app.log --exclude-query "health" --max-bytes 4000 # Budget-controlled
250
+ logler llm sql "SELECT level, COUNT(*) FROM logs GROUP BY level" -f app.log
251
+
252
+ # Request Tracing
253
+ logler llm correlate req-123 --files "*.log" # Follow correlation ID
254
+ logler llm hierarchy trace-xyz --files "*.log" # Build hierarchy tree
255
+ logler llm bottleneck trace-xyz --files "*.log" # Find slow operations
256
+
257
+ # Comparison
258
+ logler llm compare req-fail req-success --files "*.log" # Compare requests
259
+ logler llm diff app.log --baseline 1h # Before/after analysis
260
+
261
+ # Utilities
262
+ logler llm sample app.log --strategy errors_focused --size 50
263
+ logler llm context app.log 1523 --before 10 --after 10
264
+ logler llm export trace-xyz --format jaeger
265
+ ```
266
+
267
+ See **[LLM CLI Reference](docs/LLM_CLI_REFERENCE.md)** for complete documentation of all 17 commands.
268
+
213
269
  ### Visualization Modes
214
270
 
215
271
  **Tree View** - Shows parent-child relationships:
@@ -312,24 +368,20 @@ logler stats app.log --json | jq '.by_level'
312
368
  ### Investigation & Analysis
313
369
 
314
370
  ```bash
315
- # Auto-detect issues with insights
316
- logler investigate app.log --auto-insights
317
- # Output: Automatic error analysis, pattern detection, actionable suggestions
318
-
319
371
  # Analyze errors with context
320
372
  logler investigate app.log --errors
321
373
  # Shows error frequency, top error messages, time ranges
322
374
 
323
- # Find repeated patterns
324
- logler investigate app.log --patterns --min-occurrences 5
325
- # Identifies logs that repeat 5+ times
326
-
327
375
  # Follow a specific thread or request
328
376
  logler investigate app.log --thread worker-1
329
377
  logler investigate app.log --correlation req-abc123
378
+ logler investigate app.log --trace trace-xyz789
379
+
380
+ # Build hierarchy tree with bottleneck detection
381
+ logler investigate app.log --correlation req-123 --hierarchy
330
382
 
331
383
  # Token-efficient output for LLMs
332
- logler investigate app.log --auto-insights --output summary
384
+ logler investigate app.log --errors --output summary
333
385
  # Returns aggregated statistics instead of full logs
334
386
 
335
387
  # JSON output for automation
@@ -391,7 +443,7 @@ To unlock **all** of logler's capabilities (especially multi-level thread hierar
391
443
  |-------|---------|---------|
392
444
  | `timestamp` | When the event occurred (ISO 8601) | Timeline, duration analysis |
393
445
  | `level` | Log level (DEBUG/INFO/WARN/ERROR/FATAL) | Filtering, error detection |
394
- | `message` | Human-readable description | Search, pattern detection |
446
+ | `message` | Human-readable description | Search, filtering |
395
447
  | `thread_id` | Thread/worker identifier | Thread grouping, timeline |
396
448
  | `correlation_id` | Request ID across services | Cross-service tracing |
397
449
  | `trace_id` | Distributed trace identifier | OpenTelemetry integration |
@@ -437,6 +489,9 @@ Track requests across services:
437
489
  # Follow a specific correlation ID
438
490
  logler investigate app.log --correlation req-12345
439
491
 
492
+ # Follow a distributed trace ID
493
+ logler investigate app.log --trace trace-xyz789
494
+
440
495
  # View across multiple service logs
441
496
  logler view app.log service.log --grep "req-12345"
442
497
  ```
@@ -500,10 +555,36 @@ Built with:
500
555
 
501
556
  1. **Use `--follow` mode** for real-time debugging
502
557
  2. **Filter by thread** to trace execution flow
503
- 3. **Use `--auto-insights`** for automatic issue detection
558
+ 3. **Use `--hierarchy`** to visualize request flow with bottleneck detection
504
559
  4. **Export stats as JSON** for automation
505
560
  5. **Watch directories** for new log files
506
561
 
562
+ ## 🎓 Interactive Tours
563
+
564
+ Learn logler hands-on with [marimo](https://marimo.io/) notebook tours. Each tour is self-contained with sample data -- no external files needed.
565
+
566
+ ```bash
567
+ # Run any tour in your browser
568
+ uv run marimo edit examples/tours/tour_01_fundamentals.py
569
+ ```
570
+
571
+ | Tour | Topic |
572
+ |------|-------|
573
+ | 01 | Fundamentals -- search, filter, output formats |
574
+ | 02 | Thread Tracking -- grouping, correlation IDs |
575
+ | 03 | Hierarchy -- tree views, waterfall, bottleneck detection |
576
+ | 04 | Investigation -- sessions, history, report generation |
577
+ | 06 | Flamegraph -- performance visualization |
578
+ | 07 | Error Flow -- root cause analysis, propagation chains |
579
+ | 08 | Comparison -- diff hierarchies, compare threads |
580
+ | 09 | Tracing Exports -- Jaeger and Zipkin formats |
581
+ | 10 | Sampling -- smart sampling strategies |
582
+ | 12 | Multi-File -- cross-service distributed tracing |
583
+ | 13 | Live Watching -- real-time tailing and streaming |
584
+ | 14 | Performance -- 10K+ entries, benchmarks |
585
+
586
+ See the [examples README](examples/README.md) for the full learning path.
587
+
507
588
  ## 🎓 Examples
508
589
 
509
590
  ### Debug a specific request
@@ -525,10 +606,10 @@ logler view app.log -f --level ERROR
525
606
  logler view app.log --thread worker-1
526
607
  ```
527
608
 
528
- ### Investigate with insights
609
+ ### Build request hierarchy
529
610
  ```bash
530
- logler investigate app.log --auto-insights
531
- # Automatic pattern detection and issue analysis
611
+ logler investigate app.log --correlation req-123 --hierarchy
612
+ # Visualize request flow with bottleneck detection
532
613
  ```
533
614
 
534
615
  ---