Prism – Colourise log files (with ANSI characters codes)
Project description
A command line log colouriser utility.
Dependencies
Required:
argh (argument parsing)
ordereddict (if using Python 2.6)
Optional:
watchdog (optional for watching files and directories with the -w option)
pytest (optional for running tests)
Installation
From Python package index (Pypi):
(sudo) pip install logprism
or from Github:
(sudo) pip install argh watchdog
git clone https://github.com/peterhil/prism.git
cd prism
(sudo) python setyp.py install
Usage examples
prism -g /var/log/*.log
prism -m /var/log/apache2/*log
prism /opt/local/var/macports/logs/*/*.log
Todo
Show some tail lines when using -w: Make a line cache (count total lines with wc -l) from the end of the file using some blocksize.
Can be done with readlines() first. Then seek and read blocksize bytes from len(file)-blocksize and update cache.
Later enable ncurses scrolling for earlier lines?
Show n lines by default (a screenful / filecount?)
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
File details
Details for the file logprism-0.1.1.tar.gz
.
File metadata
- Download URL: logprism-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 226ab9622e2d64d01ea670320589c3a135959ad2185d6dbe4e4aba399742384e |
|
MD5 | 8c26790eff85df1d8650757ab91c4d9b |
|
BLAKE2b-256 | 69d401e505f80b838400117728ed325615a4f0e6298fa2d5506f5cc1fd2ebcf7 |