2023-10-17 19:35:02 +00:00
|
|
|
# Simple Log Visualization Tools
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2023-10-19 21:07:07 +00:00
|
|
|
```sh
|
2023-10-19 21:09:27 +00:00
|
|
|
pip install git+https://github.com/gmega/logtools.git
|
2023-10-17 19:35:02 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
### Merge by Timestamp
|
|
|
|
|
2023-10-19 21:07:07 +00:00
|
|
|
```sh
|
2023-10-17 19:35:02 +00:00
|
|
|
log-merge log1.log log2.log
|
|
|
|
```
|
|
|
|
|
|
|
|
### Merge by Timestamp Showing Aliases Instead of File Name
|
|
|
|
|
2023-10-19 21:07:07 +00:00
|
|
|
```sh
|
2023-10-17 19:35:02 +00:00
|
|
|
log-merge log1.log log2.log --aliases bootstrap codex21
|
|
|
|
```
|
|
|
|
|
|
|
|
### Merge and Filter by Timestamp
|
|
|
|
|
2023-10-19 21:07:07 +00:00
|
|
|
```sh
|
2023-10-17 19:35:02 +00:00
|
|
|
# If no timezone is provided, assumes UTC
|
|
|
|
log-merge log1.log log2.log --from 2021-01-01T00:00:00 --to 2021-01-02T00:00:00
|
|
|
|
```
|
2023-10-19 21:07:07 +00:00
|
|
|
|
|
|
|
### Transform Raw Logs into CSV
|
|
|
|
|
|
|
|
```sh
|
|
|
|
cat ./log1.log | log-to-csv
|
|
|
|
```
|
|
|
|
|
|
|
|
### Transform Raw Logs into CSV, Extracting Topics Into Column
|
|
|
|
|
|
|
|
```sh
|
|
|
|
cat ./log1.log | log-to-csv --extract-fields topics
|
|
|
|
```
|
|
|
|
|