LogSmith is a fast, local log analyzer. The project is CLI-first (GUI planned later).
Currently supported:
- Simple delimited lines like:
2025-01-13 10:32:15,123 INFO OrderService - Created order 1234
- Stack trace / continuation lines are attached to the previous entry when the line:
- starts with whitespace, or
- starts with
at, or - starts with
Caused by:
More parsers will be added over time.
dotnet builddotnet run --project LogSmith.Cli -- summarize [--min-level LEVEL] [--top-errors N] fileOrPattern1 [fileOrPattern2 ...]Examples:
dotnet run --project LogSmith.Cli -- summarize sample.log
dotnet run --project LogSmith.Cli -- summarize --min-level Warn --top-errors 5 "./logs/*.log"
dotnet run --project LogSmith.Cli -- summarize --since "2025-01-14T10:30:00Z" --until "2025-01-14T10:45:00Z" app.logExample output (from samples/sample.log):
Summary
-------
Files analyzed : 1
Total lines : 21
Parsed entries : 10
Unparsed lines : 0
Time range
---------
Earliest: 2025-01-13T10:12:04.1230000+00:00
Latest : 2025-01-13T10:12:09.0000000+00:00
By level
--------
Fatal: 0
Error: 3
Warn : 1
Info : 5
Debug: 1
Trace: 0
Top 5 error patterns (normalized)
---------------------------------
[2] "failed to load order <num>"
e.g. 2025-01-13 10:12:07,200 ERROR TicketProcessor - Failed to load order 1234
[1] "failed to acquire db connection <num> ms timeout"
e.g. 2025-01-13 10:12:05,555 ERROR DbClient - Failed to acquire DB connection 30000 ms timeout
dotnet run --project LogSmith.Cli -- grep [--level LEVEL] [--min-level LEVEL] [--contains TEXT] [--since <timestamp>] [--until <timestamp>] fileOrPatternExample:
dotnet run --project LogSmith.Cli -- grep --level Error --contains timeout "./logs/app.log"
dotnet run --project LogSmith.Cli -- grep --since 1736860205123 --min-level Error app.logLogSmith.Core: parsing + analysis primitives (clean, testable architecture)LogSmith.Cli: command-line interfaceLogSmith.Gui: placeholder project (GUI will be added later, likely with Avalonia)