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.
- {logler-1.1.2 → logler-1.2.0}/Cargo.lock +34 -35
- {logler-1.1.2 → logler-1.2.0}/Cargo.toml +1 -1
- {logler-1.1.2 → logler-1.2.0}/PKG-INFO +125 -44
- {logler-1.1.2 → logler-1.2.0}/README.md +124 -43
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/hierarchy.rs +132 -36
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/index.rs +10 -0
- logler-1.2.0/crates/logler-core/src/investigate.rs +977 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/lib.rs +2 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/parser.rs +178 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/types.rs +37 -2
- {logler-1.1.2 → logler-1.2.0}/crates/logler-py/src/lib.rs +48 -0
- {logler-1.1.2 → logler-1.2.0}/pyproject.toml +3 -1
- {logler-1.1.2 → logler-1.2.0}/src/logler/cli.py +37 -93
- {logler-1.1.2 → logler-1.2.0}/src/logler/helpers.py +0 -85
- {logler-1.1.2 → logler-1.2.0}/src/logler/investigate.py +255 -473
- {logler-1.1.2 → logler-1.2.0}/src/logler/llm_cli.py +942 -128
- {logler-1.1.2 → logler-1.2.0}/src/logler/models.py +4 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/parser.py +3 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/tree_formatter.py +26 -5
- logler-1.1.2/crates/logler-core/src/investigate.rs +0 -515
- {logler-1.1.2 → logler-1.2.0}/LICENSE +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/Cargo.toml +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/filter.rs +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/reader.rs +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/stats.rs +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/thread_tracker.rs +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-core/src/trace.rs +0 -0
- {logler-1.1.2 → logler-1.2.0}/crates/logler-py/Cargo.toml +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/__init__.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/bootstrap.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/cache.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/log_reader.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/safe_regex.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/sql.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/terminal.py +0 -0
- {logler-1.1.2 → logler-1.2.0}/src/logler/tracker.py +0 -0
- {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.
|
|
256
|
+
version = "1.2.55"
|
|
257
257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
258
|
-
checksum = "
|
|
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.
|
|
313
|
+
version = "4.5.56"
|
|
314
314
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
315
|
-
checksum = "
|
|
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.
|
|
323
|
+
version = "4.5.56"
|
|
324
324
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
325
|
-
checksum = "
|
|
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.
|
|
335
|
+
version = "4.5.55"
|
|
336
336
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
337
|
-
checksum = "
|
|
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.
|
|
534
|
+
version = "0.1.9"
|
|
535
535
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
536
|
-
checksum = "
|
|
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.
|
|
781
|
+
version = "0.1.20"
|
|
782
782
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
783
|
-
checksum = "
|
|
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.
|
|
796
|
+
version = "0.1.65"
|
|
798
797
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
799
|
-
checksum = "
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
1219
|
+
version = "1.13.1"
|
|
1221
1220
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1222
|
-
checksum = "
|
|
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.
|
|
1308
|
+
version = "1.0.44"
|
|
1310
1309
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1311
|
-
checksum = "
|
|
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.
|
|
1562
|
+
version = "0.4.12"
|
|
1564
1563
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1565
|
-
checksum = "
|
|
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.
|
|
1574
|
+
version = "0.6.2"
|
|
1576
1575
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1577
|
-
checksum = "
|
|
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.
|
|
1890
|
+
version = "1.20.0"
|
|
1892
1891
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1893
|
-
checksum = "
|
|
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.
|
|
2217
|
+
version = "0.8.37"
|
|
2219
2218
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2220
|
-
checksum = "
|
|
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.
|
|
2226
|
+
version = "0.8.37"
|
|
2228
2227
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2229
|
-
checksum = "
|
|
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.
|
|
2237
|
+
version = "1.0.19"
|
|
2239
2238
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2240
|
-
checksum = "
|
|
2239
|
+
checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: logler
|
|
3
|
-
Version: 1.
|
|
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']) #
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
|
158
|
+
if hierarchy.get('bottleneck'):
|
|
148
159
|
print(f"Bottleneck: {hierarchy['bottleneck']['node_id']} took {hierarchy['bottleneck']['duration_ms']}ms")
|
|
160
|
+
```
|
|
149
161
|
|
|
150
|
-
|
|
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
|
-
|
|
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
|
|
177
|
+
print_waterfall(hierarchy, width=100) # Waterfall timeline
|
|
158
178
|
```
|
|
159
179
|
|
|
160
180
|
**📚 Complete LLM documentation:**
|
|
161
|
-
- [
|
|
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 --
|
|
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 --
|
|
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,
|
|
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 `--
|
|
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
|
-
###
|
|
609
|
+
### Build request hierarchy
|
|
529
610
|
```bash
|
|
530
|
-
logler investigate app.log --
|
|
531
|
-
#
|
|
611
|
+
logler investigate app.log --correlation req-123 --hierarchy
|
|
612
|
+
# Visualize request flow with bottleneck detection
|
|
532
613
|
```
|
|
533
614
|
|
|
534
615
|
---
|