Skip to main content

Powerful pipes log viewer

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerful-pipes-log-viewer-1.0.0.tar.gz (14.1 kB view details)

Uploaded Source

File details

Details for the file powerful-pipes-log-viewer-1.0.0.tar.gz.

File metadata

File hashes

Hashes for powerful-pipes-log-viewer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8e254ac7633769203dc6b778c76b2c237c57f5169b0f7757fb245b8c5682bf96
MD5 2d29bb15f7bca0cadfaecf1a5bc8d6c0
BLAKE2b-256 b80d391c89a9fee3aac141becbcda62daa7b1900f7e951f240aab463a8f22864

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page