Skip to main content

Powerful Pipes Log Viewer

License

Logo

Index

Table of Contents generated with DocToc

In a nutshell Powerful Pipes Log Viewer is a command line tools for watching Powerful Pipes logs.

Install

> pip install powerful-pipes-log-viewer 

Quick start

Getting help

> 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

Listing log entries

From a file

>  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''

From stdin

>  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''

Displaying only exceptions

>  cat logs.txt | log-viewer list -e
1)   [Exception] pipe-processing -> '__init__() missing 1 required positional argument: 'source_raw''

Displaying minimum log level

>  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''

Streaming mode

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

Show entries details

From a file

>  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       |                                                                                                                                 |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+

From stdin

Works in the same way as list command.

Displaying only exceptions

Works in the same way as list command.

Displaying minimum log level

Works in the same way as list command.

Streaming mode

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

Displaying specific entry

>  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                                                                      |
+--------------+------------------------------------------------------------------------------------------+

Authors

Powerful Pipes was made by 42Crunch Research Team:

  • jc42 <https://github.com/jc42c>_
  • cr0hn <https://github.com/cr0hn>_

License

Powerful Pipes is Open Source and available under the Apache 2.

Contributions

Contributions are very welcome. See CONTRIBUTING.md or skim existing tickets to see where you could help out.

Acknowledgements

Project logo thanks to Visitor icons created by pongsakornRed - Flaticon

Metadata

Release files for powerful-pipes-log-viewer 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for powerful-pipes-log-viewer 1.0.0
File Size Uploaded
powerful-pipes-log-viewer-1.0.0.tar.gz 14.1 kB Details

Release files / powerful-pipes-log-viewer-1.0.0.tar.gz

Download URL powerful-pipes-log-viewer-1.0.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8e254ac7633769203dc6b778c76b2c237c57f5169b0f7757fb245b8c5682bf96
BLAKE2b-256 checksum
How to use checksums
b80d391c89a9fee3aac141becbcda62daa7b1900f7e951f240aab463a8f22864
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page