Log Comments
Project description
Locom
Locom is the acronym log comments. It is designed to help with log analysis.
If you are a tester or systems analyst, you need to go through the logs frequently. It is very often useful to take notes or highlight some lines. If the log is from complex system, it would be useful share your comments with others. It means commented log should be saved in some common format. This is exactly what this tool is for.
Installation
pip install locom
How it works
-
Get log file, which needs to be commented on.
-
Create rules file, which describe comments and highlights of the rows.
-
Run locom in command line.
-
Get html version of the log with comments and highlights.
Example
This example is placed example directory.
Log: input.txt
Brno
Fake row
Prague
Fake row
Bratislava
Fake row
Vienna
Fake row
Warsaw
Fake row
Berlin
Fake row
Paris
Fake row
Stockholm
Fake row
Madrid
Fake row
Rules File: rules.txt
re Brno red red comment
re Prague green green comment
re Bratislava blue blue comment
re Vienna yellow yellow comment
row 9 gray gray comment
row 11 violet violet comment
re Paris low low row and comment
re Stockholm normal normal row and comment
re Madrid hide
CLI
locom cli -r rules.txt -i input.txt -o output_example.html --title "Example of rows and comments" --description "This example shows all possible type of rows and comments."
Note: Used Python has to have /Scripts in the path.
Output HTML: output_example.html
Missing line 17 is not a error. It is result of hide render.
Rules File
One line in file is one rule. Every rules has 3 mandatory parts and 1 optional part. Parts are separated by 4+ whitespaces.
Consider this example with named parts.
re Brno red red comment
[row recognizer type] [recognizer value] [render type] [comment - optional]
Recognizer
2 types of recognizers are implemented:
-
re - Recognizer value is regular expression for this type of recognizer.
-
row - Recognizer value is row number for this type of recognizer.
Renders
List of all renders:
- red
- green
- blue
- yellow
- gray
- violet
- low
- normal
- hide
Project details
Release history Release notifications | RSS feed
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 locom-0.3.9.tar.gz
.
File metadata
- Download URL: locom-0.3.9.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4308249bd382800ffc61ffe5d98b2d0f626afa1d7e680622a7370d875444b9e4 |
|
MD5 | fbabe90fa13b615ead1ccb3c3cb8e86e |
|
BLAKE2b-256 | 091e4e4d0b18fa8de965ed06a783c95540d2105d4b7a3a4bcc0a8b137827ace2 |