Table of Contents generated with DocToc
- Install
- Quick start
In a nutshell Powerful Pipes Log Viewer
is a command line tools for watching Powerful Pipes
logs.
> pip install powerful-pipes-log-viewer
> log-viewer help
Usage: log-viewer [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
help Displays help
list List long entries (default)
show Show log entry details
> log-viewer list logs.txt
1) [ INFO ] pipe-processing -> 'My log'
2) [ ERROR ] pipe-processing -> 'Ey I\'m another log'
3) [Exception] pipe-processing -> '__init__() missing 1 required positional argument: 'source_raw''
> cat logs.txt | log-viewer list
1) [ INFO ] pipe-processing -> 'My log'
2) [ ERROR ] pipe-processing -> 'Ey I\'m another log'
3) [Exception] pipe-processing -> '__init__() missing 1 required positional argument: 'source_raw''
> cat logs.txt | log-viewer list -e
1) [Exception] pipe-processing -> '__init__() missing 1 required positional argument: 'source_raw''
> cat logs.txt | log-viewer list --log-level error
1) [ ERROR ] pipe-processing -> 'Ey I\'m another log'
2) [Exception] pipe-processing -> '__init__() missing 1 required positional argument: 'source_raw''
In streaming mode all raw input data from the previous pipe will be streamed to the stdout
log-viewer writes all the console results in stderr
> cat logs.txt | log-viewer list --stream > stream.results.txt
1) [ INFO ] pipe-processing -> 'My log'
2) [ ERROR ] pipe-processing -> 'Ey I\'m another log'
3) [Exception] pipe-processing -> '__init__() missing 1 required positional argument: 'source_raw''
> wc stream.results.txt
3 98 5291 stream.results.txt
> log-viewer show logs.txt
+--------------+------------------------------------------------------------------------------------------+
| Number | 1 |
+--------------+------------------------------------------------------------------------------------------+
| Command Line | pipe-processing -c 11 -A |
+--------------+------------------------------------------------------------------------------------------+
| Date | 2022-05-25 16:00:38.951848 |
+--------------+------------------------------------------------------------------------------------------+
| Type | INFO |
+--------------+------------------------------------------------------------------------------------------+
| Message | My log |
+--------------+------------------------------------------------------------------------------------------+
+--------------+------------------------------------------------------------------------------------------+
| Number | 2 |
+--------------+------------------------------------------------------------------------------------------+
| Command Line | pipe-processing -c xxx -A |
+--------------+------------------------------------------------------------------------------------------+
| Date | 2022-05-25 16:05:39.951848 |
+--------------+------------------------------------------------------------------------------------------+
| Type | ERROR |
+--------------+------------------------------------------------------------------------------------------+
| Message | Ey I\'m another log |
+--------------+------------------------------------------------------------------------------------------+
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Number | 3 |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Command Line | pipe-processing -c xxx -A |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Date | 2022-05-25 16:10:41.360994 |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Type | Exception |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Extra data | { |
| | "exception": "__init__() missing 1 required positional argument: 'source_raw'" |
| | } |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Exception | TypeError |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Exception Message | __init__() missing 1 required positional argument: 'source_raw' |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Exception file | /Projects/demos/pipe-processing |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Stack Trace | File "/Projects/demos/pipe-processing", line 430, in actor_model |
| | normalized = normalize_model(info) |
| | |
| | File "/Projects/demos/pipe-processing", line 61, in actor_model_loader |
| | actor = Actor( |
| | |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Exception User | __init__() missing 1 required positional argument: 'source_raw' |
| Message | |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
Works in the same way as list
command.
Works in the same way as list
command.
Works in the same way as list
command.
Works in the same way as list
command.
In streaming mode all raw input data from the previous pipe will be streamed to the stdout
> log-viewer show -n 2 logs.txt
+--------------+------------------------------------------------------------------------------------------+
| Number | 2 |
+--------------+------------------------------------------------------------------------------------------+
| Command Line | pipe-processing -c xxx -A |
+--------------+------------------------------------------------------------------------------------------+
| Date | 2022-05-25 16:05:39.951848 |
+--------------+------------------------------------------------------------------------------------------+
| Type | ERROR |
+--------------+------------------------------------------------------------------------------------------+
| Message | Ey I\'m another log |
+--------------+------------------------------------------------------------------------------------------+
Powerful Pipes was made by 42Crunch Research Team:
jc42 <https://github.com/jc42c>
_cr0hn <https://github.com/cr0hn>
_
Powerful Pipes is Open Source and available under the Apache 2.
Contributions are very welcome. See CONTRIBUTING.md or skim existing tickets to see where you could help out.
Project logo thanks to Visitor icons created by pongsakornRed - Flaticon